#include<iostream>
#include<string>
#include<vector>
#include<cctype>
#include<cstring>
#include<cmath>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
using namespace std;

int stoi(string s){
	int size=s.size();
	int ret=0;
	rep(i,size){
		ret+=(int)(s[i]-'0')*(int)pow(10,(size-i-1));
	}
	return ret;
}

int main(){
	vector<string> spot;
	string s;
	while(getline(cin,s)){
		spot.push_back(s);
	}
	int ans=0;
	rep(i,spot.size()){
		rep(j,spot[i].size()){
			if(isdigit(spot[i][j])){
				int start=j;
				while(isdigit(spot[i][j]))j++;
				string alt="";
				alt=spot[i].substr(start,j-start);
				ans+=stoi(alt);
			}
		}
	}
	cout<<ans<<endl;
	return 0;
}