#include using namespace std; int main(){ string s; cin >> s; int sum=0; for(int i=0; i < 9; i++){ sum += int(s[i]); } cout << sum << endl; }