#include <iostream>
#include <sstream>
#include <algorithm>
using namespace std;
int main( void )
{
	int kotae = 0;
	string in;
	while ( 1 )
	{
		getline( cin, in );
		if ( cin.eof() ) break;
		for ( string::iterator it = in.begin(); it != in.end(); it++ )
			if ( !( *it >= '0' && *it <= '9' ) )
				*it = ' ';
		istringstream is( in );
		int n;
		while ( is >> n )
		{
			kotae += n;
		}
	}
	cout << kotae << endl;
	return 0;
}