#include #include using namespace std; int main(void) { string str; cin >> str; int sum = 0; string::iterator it; for(it = str.begin(); it != str.end(); it++) { if('0' <= *it && *it <= '9') sum += *it - 48; } cout << sum << endl; return 0; }