# include using namespace std; constexpr int ctoi(const char c) { return ('0' <= c && c <= '9') ? (c - '0') : -1; } int main() { string s; cin >> s; int sum = 0; for (auto& c : s) { sum += ctoi(c); } cout << sum << endl; }