#include "bits/stdc++.h" using namespace std; #define OUT(x) cout << #x << " = " << x << endl; #define rep(i, n) for (int (i) = 0; (i) < (int)(n); (i)++) #define rer(i, l, r) for (int (i) = (int)(l); (i) <= (int)(r); (i)++) #define reu(i, l, r) for (int (i) = (int)(l); (i) < (int)(r); (i)++) #define each(i, v) for (auto i : v) #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define pb(x) push_back(x) #define bp(x) __builtin_popcount(x) #define mp(x, y) make_pair((x), (y)) #define fi first #define se second #define setp(x) setprecision(x) #define mset(m, v) memset(m, v, sizeof(m)) static const int INF = 0x3f3f3f3f; static const long long INFL = 0x3f3f3f3f3f3f3f3fLL; static const int MOD = 1000000007; static const double PI = 3.14159265358979; #define int long long typedef vector vd; typedef vector vs; typedef vector vb; typedef vector vi; typedef pair pii; typedef vector vpii; template void pv(T a, T b) { for (T i = a; i != b; i ++) cout << *i << " "; cout << endl; } template inline void amin(T &x, U y) { if (y < x) x = y; } template inline void amax(T &x, U y) { if (x < y) x = y; } int in() { int _x; cin >> _x; return _x; } signed main() { char s[110]; cin >> s; int ans = 0; rep(i, strlen(s)) { if ('0' <= s[i] && s[i] <= '9') ans += s[i] - '0'; } cout << ans << endl; return 0; }