#include<iostream>
#include<string>
#include<cmath>
#include<cctype>

using namespace std;

int ExtractInt(string &s){
	int ret = 0;
	int keta = 0;
	for(int i = s.length() - 1; i >= 0; i--){
		if( isdigit(s[i]) ){
			while( isdigit(s[i]) ){
				ret += (int)pow(10, (double)keta) * (s[i] - '0');
				keta++;
				i--;
			}
			keta = 0;
		}
	}
	return ret;
}

int main(void){
	int key = 0;
	while( true ){
		string s;

		cin >> s;
		if( cin.eof() ) break;

		key += ExtractInt( s );
	}

	cout << key << endl;
	return 0;
}