/* -- 0064:Secret Number -- */
#include	<iostream>
#include	<string>

using namespace std;

bool isNumber(char c) {
	if('0' <= c && c <= '9') {
		return true;
	} else {
		return false;
	}
}

int main(void) {
	int sum = 0, subS = 0;
	bool readNums;
	string str;

	while(1) {
		cin >> str;
		if(cin.eof()) { break; }
		string::iterator it = str.begin();
		readNums = false;
		while( it != str.end() ) {
			if( isNumber(*it) ) {
				if( !readNums ) { readNums = true; }
				subS *= 10;
				subS += *it - '0';
			} else if( readNums ) {
				sum += subS;
				subS = 0;
				readNums = false;
			}
			it++;
		}
		sum += subS;
	}
	cout << sum << endl;
	return 0;
}