#include #include using namespace std; int main() { string S; cin >> S; int Sum = 0; for (int i = 0; i < S.size(); i++) { if ((S[i] >= 'a' && S[i] <= 'z') || (S[i] >= 'A' && S[i] <= 'Z')) { continue; } int num; string N = S.substr(i,1); num = stoi(N); Sum = Sum + num; } cout << Sum << endl; return 0; }