#include <iostream> using namespace std; int main(){ char a[9]={0}; int b; gets(a); for(int i=0;i<8;i++){ if(a[i]==49){ b++; } } cout<<b; return 0; }