#include #include using namespace std; //変数デバッグ #define DEB(variable) cout << #variable << "=" << variable << endl //for簡易表記(引数ミス防止) #define INFOR(inc, a, b) for (int inc = (a); (inc) < (b); (inc)++) //incをaにし、b-a回(iがb未満の間)処理を行う #define DEFOR(inc, a, b) for ((inc) = (a); (inc) > (b); (inc)--) //incをaにし、a-b回(iがbより大きい間)処理を行う int main(){ char c; int count=0; while(cin>>c){ c -= 48; if(c){ count += c; }else{ count += 10; } } cout << count; return 0; }