#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<algorithm>
#include<cstring>
#include<vector>
#include<sstream>
#include<queue>
#include<stack>
#include<string>
#include<climits>
#include<map>
#include<set>
#define REP(i,s,n) for(int i=s;i<n;i++)
#define rep(i,n) REP(i,0,n)
#define INF 1<<30
#define F first
#define S second
using namespace std;
typedef pair<int,int> P;

int main(){
  string s;
  int sam = 0,st;
  bool config;
  while(getline(cin,s,'\n')){
    config = false;
    for(int i=0;i<=s.length();i++){    
      if(('a' <= s[i] && s[i] <= 'z') || i == s.length() ){
	if(config){
	  sam += (atoi)(s.substr(st,i-st).c_str());
	  config = false;
	}
	continue;
      }
      if(!config)st = i;
      config = true;
    }
  }
  cout << sam << endl;
return 0;
}