#include #include #include #include #define REP(i, a, b) for (int i = int(a); i < int(b); i++) using namespace std; typedef long long int lli; int main() { string s; cin >> s; int sum = 0; REP (i, 0, s.size()) { if ('0' <= s[i] && s[i] <= '9') sum += s[i] - '0'; } cout << sum << endl; return 0; }