#include using namespace std; int main(int argc, const char* argv[]) { string S; cin >> S; int sum = 0; for (auto&& c : S) { if ('0' <= c && c <= '9') sum += c - '0'; } cout << sum << endl; return 0; }