#include #include using namespace std; typedef long long int lint; bool digitQ(char ch) { ch -= '0'; if (0 <= ch && ch < 10) return true; return false; } int main() { string str; cin >> str; lint sum = 0; for (int i = 0; i < str.size(); i++) if (digitQ(str[i])) sum += str[i] - '0'; cout << sum << endl; return 0; }