#include using namespace std; using ll = long long; int main() { string s; cin >> s; int ans = 0; for (char c: s) { if ('0' <= c && c <= '9') { ans += c - '0'; } } cout << ans << endl; }