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

int main(){
	string s, is;
	int n, sum = 0;

	while ( cin >> s ){
		int index = 0;
		while ( !( index == s.size() ) ){
			if ( s[ index ] >= '0' && s[ index ] <= '9' ){
				int len = 1;
				while (  s[ index + len ] >= '0' && s[ index + len ] <= '9' ){
					++len;
				}
				string is( s, index, len );
				istringstream iss( is );
				iss >> n;
				sum += n;
				index += len;
			}else{
				++index;
			}
		}
	}

	cout << sum << endl;

	return 0;
}