#include<iostream>
#include<string>
#include<cctype>
#include<cstdlib>
#include<vector>
#include<cmath>
using namespace std;

int main(){
	string ss="",str="";
	while(cin>>ss){
		str+=ss;
		cin.ignore();
	}
	string cs="";
	vector<string> spot;
	for(int i=0;i<str.size();i++){
		if(isdigit(str[i])){
			while(isdigit(str[i])){
				cs+=str[i];
				i++;
			}
		}
		spot.push_back(cs);
		cs="";
	}
	int ans=0;
	for(int i=0;i<spot.size();i++){
		string moji=spot[i];
		for(int j=moji.size()-1;j>=0;j--){
			ans+=(moji[j]-'0')*pow(10,moji.size()-1-j);
		}
	}
	cout<<ans<<endl;
	return 0;
}