#define FOR(i, a, b) for (int i = (a); i < (b); i++) #define RFOR(i, a, b) for (int i = (b)-1; i >= (a); i--) #define REP(i, n) for (int i = 0; i < (n); i++) #define RREP(i, n) for (int i = (n)-1; i >= 0; i--) #define MIN(a, b) (a > b ? b : a) #define MAX(a, b) (a > b ? a : b) #include using namespace std; int main() { string S; cin >> S; long ans = 0; REP(i, S.size()) { if (isdigit(S[i])) { ans += S[i] - '0'; } } cout << ans << endl; return 0; }