#define _USE_MATH_DEFINES #include //cin, cout #include //vector #include //sort,min,max,count #include //string #include //fixed #include //setprecision #include //swap #include //abs(int) #include //sqrt #include //stringstream,getline #include //ceil,M_PI using namespace std; int main() { string S; cin >> S; int ans = 0; for (unsigned int i = 0; i < S.length(); i++) { if ('0' < S[i] && S[i] <= '9') { ans += S[i] - '0'; } } cout << ans << endl; return 0; }