#include using namespace std; int main() { string S; cin >> S; int N = S.size(); int ans = 0; for (int i = 0; i < N; i++) { if ('1' <= S[i] && S[i] <= '9') { ans += S[i] - '0'; } } cout << ans; }