#include<iostream>
#include<string>
using namespace std;
int main(){
long i,n=0,k,l;
string s;
string::size_type p,q;
while(cin>>s){
l=s.size();
for(q=-1;;){
p=s.find_first_of("0123456789",q+1);
if(p==string::npos)break;
q=s.find_first_not_of("0123456789",p);
if(q==string::npos)q=l;
for(i=p,k=0;i<q;i++){k*=10;k+=s[i]-48;}
n+=k;
}
}
cout<<n<<endl;
return 0;
}