#include<iostream>
#include<string>
int main()
{
	int ans = 0;
	while (true)
	{
		std::string str;
		if (!std::getline(std::cin, str))
		{
			break;
		}
		int sum = 0;
		for (auto i : str)
		{
			if ('0' <= i && i <= '9')
			{
				sum *= 10;
				sum += static_cast<int>(i - '0');
			}
			else
			{
				ans += sum;
				sum = 0;
			}
		}
	}
	std::cout << ans << std::endl;
	return 0;
}
