#include using namespace std; #define REP(i, n) for(int i = 0; i < n; i++) int main() { string s; cin >> s; int ans = 0; REP(i, s.length()) { if (s[i] >= '1' && s[i] <= '9') { ans += s[i] - '0'; } } cout << ans << endl; return 0; }