#include #include #include using namespace std; int main() { char buffer[10001] = "\0"; cin >> buffer; int answer = 0; for (auto i = 0; i != ::strlen(buffer); ++i) { if ('0' <= buffer[i] && buffer[i] <= '9') { answer += buffer[i] - '0'; } } cout << answer << endl; return 0; }