#include using namespace std; int main(void){ string a; cin >> a; int sum=0; for (auto i=a.begin();i!=a.end();i++){ sum += *i-'0'; } cout << sum << endl; }