#include <iostream>
#include <sstream>
using namespace std;
int main()
{
string s;
while(getline(cin, s)){
int sum = 0;
string tmp;
stringstream ss(s);
while( ss >> tmp){
bool allnum = true;
for(int i = 0; i < (int)tmp.length(); ++i){
if(tmp[i] >= '0' && tmp[i] <= '9')
continue;
else{
allnum = false;
break;
}
}
if(!allnum)
continue;
stringstream st(tmp);
int ans = 0;
st >> ans;
sum += ans;
}
cout << sum << endl;
}
return 0;
}