# include # include # include # include # include # include # include # include # include # include # include # include # include # include # include #include #include #include #include #include using namespace std; typedef long long int ll; const int N = 1000000; const ll INF = std::numeric_limits::max(); #define rep(i,n) for(ll i=(ll)0;i<(ll)n;++i) #define srep(i,s) rep(i,(ll)s.size()) #define ALL(x) x.begin(),x.end() #define pp pair #define fi first #define se second #define sz size const ll mod = 1000000007; string YN(bool b) { return(b ? "YES" : "NO"); } string yn(bool b) { return(b ? "Yes" : "No"); } ll n=0; string s; int main() { cin >> s; srep(i, s)if (s[i] >= '0'&&s[i] <= '9')n += s[i] - '0'; cout << n << endl; return 0; }