#include <iostream>
#include <string>
using namespace std;

int main(){
  int i,sum,k;
  string s;
  i=0;
  sum=0;
  while(cin>>s){
    
    k=1;
    for(int j=s.size()-1;j>=0;j--){
      if('0'<=s[j]&&s[j]<='9'){
	sum+=k*(s[j]-'0');
	k*=10;
      }else k=1;
    }
    
  }
  cout<<sum<<endl;
    return 0;
}