#include <iostream>
#include <string>
#include <math.h>
using namespace std;

int main()
{
	string str;
	int ans = 0;

	while (getline(cin, str))
	{
		int j = 0;
		for (int i = str.size() - 1; i >= 0; i--)
		{
			if ('0' <= str[i] && str[i] <= '9')
			{
				ans += pow(10, j) * (str[i] - '0');
				j++;
			}
			else
			{
				j = 0;
			}
		}
	}
	cout << ans << endl;

	return 0;
}