 #include<iostream>
 #include<stdio.h>
 #include<string>
 #include<math.h>
 #include<iomanip>
 #include<algorithm>
 #include<string.h>
 #include<cctype>
 #include<map>
 #include<set>
 #include<vector>
 #include<sstream>
 #include<stack>
 #include<queue>
 #include<deque>
 #include<functional>
 #include<utility>
 
 using namespace std;

 int main()
 {
   string s;
   int total=0;
   while(cin>>s)
   {
     //if(s=="0") break;
     int num=0;
     for(int i=0;i<s.length();i++)
     {
       while((i<s.length())&&isdigit(s[i]))
       {
         num=10*num+(s[i]-'0');
         i++;                   
       }        
       total+=num;
       num=0;
     }             
   }
   cout<<total<<endl;
   //while(1);
   return 0;
 }