#define _GLIBCXX_DEBUG #define ll long long #include using namespace std; using Graph = vector>; int main(){ string S; cin >> S; int ans = 0; for(int i = 0; i < (int)S.size(); i++){ int s = S[i]-'0'; ans += s; } cout << ans << endl; }