#include<iostream>
#include<cstdio>
#include<string>
using namespace std;
int main(){
  int ans=0;
  string s;
  while(cin>>s){
    int tmp=0;
    for(int i=0;i<s.size();i++){
      tmp=0;
      while(s[i]<'0'||'9'<s[i])i++;
      if(!(i<s.size()))continue;
      while(!(s[i]<'0'||'9'<s[i])){
        tmp*=10;
        tmp+=int(s[i]-'0');
        i++;
      }
      ans=ans+tmp;
    }
  }
  cout<<ans<<endl; 
}