#include using namespace std; using ll = long long; const ll mod = 1e9 + 7; const ll inf = (1 << 30) - 1; const ll infll = (1LL << 61) - 1; int a; int main() { string s; cin >> s; for (int i = 0; i < s.size(); i++) { a += s[i] - '0'; } cout << a << endl; }