#include <iostream>
#include <string>
#include <queue>
#include <stack>

using namespace std;

int main(){
	int ans = 0;
	string str;
	stack<int> tmp;
	while(cin>>str){
		for(int i=0;i<str.size();i++){
			if(str[i]>='0' && str[i] <='9'){
				tmp.push(str[i] - '0');
			}
			else{
				if(tmp.size()){
					int size = tmp.size();
					int rate = 1;
					for(int i=0;i<size;i++){
						ans += tmp.top() * rate;
						rate *= 10;
						tmp.pop();
					}
				}
			}
		}

	}
	if(tmp.size()){
		int size = tmp.size();
		int rate = 1;
		for(int i=0;i<size;i++){
			ans += tmp.top() * rate;
			rate *= 10;
			tmp.pop();
		}
	}

	cout<<ans<<endl;
}

/*
Sample Input
Thereare100yenonthetable.Iam17yearsold.
Ishouldgohomeat6pm.
Output for the Sample Input
123
*/