#include<iostream> using namespace std; int main() { string word; int one=0; cin>>word; for(int i=0;i<word.size();i++) if(word[i]=='1') one++; cout<<one; return 0; }