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

using namespace std;

string add (string a, string b )
{
	reverse (a.begin(), a.end() );
	reverse (b.begin(), b.end() );

	while (a.length() != b.length() ){
		if (a.length() > b.length() ){
			b += '0';
		}else if (a.length() < b.length() ){
			a += '0';
		} // end if
	} // end while

	string res = "";
	int carry = 0;

	for (int i = 0; i < a.length(); ++i){
		int an = a[i] - '0';
		int bn = b[i] - '0';
		if (carry == 1 ){
			++an;
		} // end if
		if (an + bn >= 10 ){
			carry = 1;
		}else{
			carry = 0;
		} // end if
		res += ((an + bn ) % 10 ) + '0';
	} // end for

	if (carry == 1 ){
		res += carry + '0';
	} // end if

	reverse (res.begin(), res.end() );

	return res;
}

int main()
{
//	cut here before submit 
//	freopen("testcase.secret", "r", stdin);
	string str = "";
	string 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 = add (res, num );
				num = "";
			} // end if
		} // end for
		if (!num.empty() ){
			res = add (res, num );
		} // end if
	} // end loop

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