#include<iostream>
#include<string>
using namespace std;
int main(){
  string s;
  int ans = 0;
  while(getline(cin,s)){
    int k = 0;
    for(int i=0; i<s.size(); i++){
      if(s[i]>='0' && s[i]<='9') k = k*10+s[i]-'0';
      else if(k!=0){ans+=k;k = 0;}
    }
    if(k!=0) ans+=k;
  }
  cout <<ans<<endl;
  return 0;
}