#include using namespace std; int main(){ string S; int ans=0; cin >> S; for(int i=0;i0) ans+=S[i]-'0'; } cout << ans << endl; return 0; }