#include #include #include #include int main() { std::string s; std::cin >> s; int sum = 0; for(auto si = s.begin(); si != s.end(); si++){ char c = *si; unsigned int i = c; if(49 <= i && i <= 57){ sum += (i - 48); } } std::cout << sum; return 0; }