#include #define LL long long #define ULL unsigned long long #define REP(i, n) for(int i=0; i<(n); i++) #define REP2(i, x, n) for(int i=x; i<(n); i++) #define SORT(n) sort((n).begin(), (n).end(), greater()) using namespace std; int main(){ cin.tie(0); ios::sync_with_stdio(false); string s,tmp; cin >> s; REP(i, (int)s.size()){ if(isdigit( s[i] )){ tmp+=s[i]; } } vector vc; REP(i, (int)tmp.size()){ string tmp2 = tmp.substr( i, 1 );//切り出し int tmp3 = stoi( tmp2 );//intへ変換 vc.push_back( tmp3 );//格納 } cout << accumulate( vc.begin(), vc.end(), 0 ) << endl; return 0; }