#include<iostream>
#include<string>
#include<cmath>
using namespace std;

int main(){

	int n, len, cnt;
	string str;
	
	n = 0;
	while(getline(cin, str)){
		len = str.length();
		cnt = 0;
		for(int i=len-1; i>=0; i--){
			if(str[i] >= '0' && str[i] <= '9'){
				n += (str[i] - '0') * pow(10, cnt);
				cnt++;
			}
			else {
				cnt = 0;
			}
		}
	}

	cout << n << endl;

	return 0;

}