#include #define REP(i,n) for(int i=0;i<(int)(n);i++) using namespace std; typedef long long int ll; int main() { string S; int cnt=0; cin >> S; REP(i,S.size()){ if(S[i] <= '9' && S[i] >= '0') cnt += S[i] - '0'; } cout << cnt << endl; return 0; }