#include using namespace std; #define rep(i,n) for (int (i)=(0);(i)<(int)(n);++(i)) using ll = long long; using P = pair; using namespace std; int main() { string s; cin >> s; int ans = 0; rep(i, s.size()) { if ('0' <= s[i] and s[i] <= '9') { ans += s[i]-'0'; } } cout << ans << endl; return 0; }