# include # include # include # include # include # include # include # include # include # include # include # include # include using namespace std; using LL = long long; constexpr int MOD = 1000000000 + 7; //足し算してオーバーフローで死なないように確認しようね constexpr int INF = 1000000000; const double PI = acos(-1); int main() { string s; cin >> s; int sum = 0; for (int i = 0; i < s.size(); i++) { if (s[i] >= '0'&&s[i] <= '9') { sum += s[i] - '0'; } } cout << sum << endl; }