#include using namespace std; int main(){ cin.tie(0); ios::sync_with_stdio(false); string s; cin >> s; int res{0}; for(auto &x: s){ if(isdigit(x)){//数値判定 res += x - '0';//0はASCIIコードで「48」 } } cout << res << endl; return 0; }