#include #include int main(int argc, char *argv[]) { std::string input; std::cin >> input; int answer = 0; for (auto i = input.begin(); i != input.end(); i++) { unsigned char current = static_cast(*i); if (std::isdigit(current)) { answer += current - '0'; } } std::cout << answer << std::endl; return 0; }