#include #include #define REP(i,n) for(int i=0;i<(n);++i) #define SORT(a) sort((a).begin(),(a).end()) #define PB push_back using namespace std; int main(){ string S; cin >> S; int l = S.size(); int r = 0; REP(i,l){ char c = S[i]; if(c >= '0' && c <= '9'){ r += c - '0'; } } cout << r << endl; }