#include #include #include using namespace std; int main() { int sum=0, tmp; string str; cin >> str; for(int i=0;i(str[i]))){ tmp = (int)(str[i] - '0'); sum = sum + tmp; } } cout << sum << endl; return 0; }