#include<iostream>
#include<string>
#include<cstdlib>
#include<cctype>

int main()
{
	std::string s;
	int ans = 0;
	while( std::cin >> s )
	{
		int i = 0;
		while( i < s.size() )
		{
			int j = i;
			while( isdigit( s[j] ) )
				++j;

			if( i != j )
			{
				ans += atoi( s.substr( i, j - i ).c_str() );
				i = j;
			}

			++i;
		}
	}

	std::cout << ans << std::endl;

	return 0;
}