#include #include #include #include #include #include #include using namespace std; int main() { string s; cin >> s; int r = 0; int n = (int)s.size(); for (int i = 0; i < n; i++) { int k = s[i] - '0'; if (0 <= k && k < 10) r += k; } cout << r << endl; return 0; }