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