#include<iostream> using namespace std; int main() { int a; int res = 0; while(~scanf("%1d", &a)) { res += a; } cout << res << endl; return 0; }