#include <iostream>
#include <string>
#include <algorithm>
#include <sstream>
//#include <fstream>

using namespace std;

int stoi (string str )
{
	stringstream ss (str );
	int n; 

	ss >> n;

	return n;
}

int main()
{
//	cut here before submit 
//	freopen("testcase.secret", "r", stdin);
	string str = "";
	int res = 0;

	while (getline (cin, str ) ){
		int len = str.length();
		string num = "";

		for (int i = 0; i < len; ++i){
			if (isdigit(str[i]) ){
				num += str[i];
			}else if (!num.empty() ){
				res += stoi (num );
				num = "";
			} // end if
		} // end for
		if (!num.empty() ){
			res += stoi (num );
		} // end if
	} // end loop

	cout << res << endl;	
		
	return 0;
}