#include <iostream>
#include <cstring>
#include <cstdlib>
using namespace std;
int main()
{
	int i, r = 0, t = 1;
	char s[81] = "", c;
	while (cin >> s)
	{
		for (i = strlen(s); i >= 0; i--)
		{
			c = s[i];
			if ('0' <= c && c <= '9')
			{
				r += atoi(&c) * t;
				t *= 10;
			}
			else
			{
				t = 1;
			}
		}
	}
	cout << r << endl;
}