#include using namespace std; #define LENGTH 10001 int main() { char str[LENGTH]; cin >> str; int sum = 0; for (int i = 0; str[i] != '\0'; i++) { if ('1' <= str[i] && str[i] <= '9') { sum += str[i] - '0'; } } cout << sum << endl; return 0; }