#include<iostream>
#include<string>
#include<vector>
#include<cstdio>
#include<sstream>
#include<algorithm>
#include<cmath>
#include<map>
#include<functional>
#include<queue>
#include<stack>
#include<set>
using namespace std;
int stoi(string x){stringstream ss;ss<<x;int tmp;ss>>tmp;return tmp;}
string itos(int x){stringstream ss;ss<<x;return ss.str();}
int main(){
string n,tmp;
int cnt=0;
	while(getline(cin,n)){
		for(int i=0;i<n.size();i++){
			bool f=0;
			for(int j=0;j<10;j++)if(n[i]==j+'0')f=1;
			if(f)tmp.push_back(n[i]);
			else {
				if(!tmp.empty()){cnt+=stoi(tmp);tmp.clear();}
			}
		}
	}
	if(!tmp.empty())cnt+=stoi(tmp);
	cout<<cnt<<endl;
	return 0;
}