#include<bits/stdc++.h> using namespace std; int main(){ char a; int k=0; while(cin>>a){ if(a=='1')k++; } cout<<k; }