#include using namespace std; string s; int m = 0; int main() { cin >> s; for (int i = 0; i < s.size(); i++) { if (isdigit(s[i])) m += s[i] - '0'; } cout << m << endl; }