#include <string>
#include <iostream>

using namespace std;

int main()
{
	int ret = 0;
	
	string S;

	while (cin >> S)
	{
		int sum = 0;

		for (int i = 0; i < S.size(); i++)
		{
			if (!isdigit(S[i]))
			{
				ret += sum; sum = 0;
			}
			else
			{
				sum *= 10; sum += S[i] - 48;
			}
		}

		ret += sum;
	}

	cout << ret << endl;

	return 0;
}