#define _GLIBCXX_DEBUG #define ll long long #include using namespace std; using Graph = vector>; void print(auto a){ cout << a; } void printL(auto a){ cout << a << endl; } int C(char c){ if(!('0' <= c and c <= '9')) return 0; return c-'0'; } int main(){ string S; cin >> S; int ans = 0; for(int i = 0; i < (int)S.size(); i++){ ans += C(S[i]); } printL(ans); }