#include typedef long long ll; using namespace std; int INF = 1e9; int MOD = 1e9+7; int sum; main(){ string s; cin >> s; for(char c:s)if(c >= '1' && c <= '9')sum += c-'0'; cout << sum; }