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