#include "bits/stdc++.h" using namespace std; using ll = long long; using ld = long double; using P = pair; using vi = vector; using vvi = vector; const int INF = 1e9; #define rep(i, n) for(int i = 0; i < (n); i++) #define rep2(i, x, n) for(int i = x; i < (n); i++) #define all(n) begin(n), end(n) const long long llINF = 1LL << 60; void Main() { string s; cin >> s; int ans = 0; rep(i, s.size()) { if('0' <= s[i] && s[i] <= '9') { ans += (s[i] - '0'); } } cout << ans << endl; } int main() { std::cin.tie(nullptr); std::ios_base::sync_with_stdio(false); std::cout << std::fixed << std::setprecision(15); Main(); return 0; }