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