#include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); string S; cin >> S; int res = 0; for (char s : S) { if ('0' <= s && s <= '9') res += s - '0'; } cout << res << '\n'; return 0; }