#include <iostream>
#include <cstring>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <cstdio>
#include <map>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,b) FOR(i,0,b)
#define PB push_back
#define MP make_pair
int main(){
  string s;
  int ans=0;
  while(cin>>s){
    for(int i=0;i<s.size();i++){
      if('0'<=s[i]&&s[i]<='9'){
        //cout<<i<<" "<<s[i]<<endl;
        string tmp="";
        while('0'<=s[i]&&s[i]<='9'){
          tmp+=s[i];
          i++;
        }
        //cout<<tmp<<endl;
        int k=1;
        for(int j=tmp.size()-1;j>=0;j--){
          ans+=k*(tmp[j]-'0');
          k*=10;
        }
        //cout<<ans<<endl;
      }
    }
  }
  cout<<ans<<endl;
}