#include <iostream>
#include <string>

using namespace std;

void solve()
{
	int sum = 0;
	string str;
	while(getline(cin, str))
	{
		int size = str.size();
		
		for(int i = 0; i < size; ++i)
		{
			if('0' <= str[i] && str[i] <= '9')
			{
				string temp;
				while('0' <= str[i] && str[i] <= '9')
				{
					temp += str[i];
					++i;
				}
				int size2 = temp.size();
				int a = 1;
				for(int j = size2 - 1; j >= 0; --j)
				{
					sum += (temp[j] - '0') * a;
					a *= 10;
				}
			}
		}
	}
	cout << sum << endl;
}

int main()
{
	solve();
	return(0);
}