#include #include #include #include #include #include #include #include #include #include #include #define FOR(i, a, b) for(int i=(a);i<=(b);i++) #define RFOR(i, a, b) for(int i=(a);i>=(b);i--) #define MOD 1000000007 #define INF 1000000000 using namespace std; int main(void) { string s; int count = 0; cin >> s; FOR(i, 0, s.size()-1) { if (s[i] >= '1'&&s[i] <= '9') { count += s[i] - '0'; } } cout << count << endl; return 0; }