#include #include #include #include #include using namespace std; int main() { int a, b, c, sum = 0; string str; // 標準入力から、空白や改行で区切られた整数と文字列を読み込む。 cin >> str; //if(a % b == 0){ // cout << a/b + 1 << endl; //}else{ // cout << a/b << endl; //} for(int i=0;i(str[i]))){ sum = sum + (int)(str[i] - '0'); } } // 整数と文字列を空白で区切って、標準出力に書き出す。 //cout << s << endl; cout << sum << endl; return 0; }