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