#include <iostream>
#include <cstdlib>
#include <string>

using namespace std;

void solve()
{
	int sum = 0;
	string str;
	while(cin >> str)
	{
		int n = str.size();
		for(int i = 0; i < n; ++i)
		{
			string s;
			if('0' <= str[i] && str[i] <= '9')
			{
				while(i < n && '0' <= str[i] && str[i] <= '9')
				{
					s += str[i];
					++i;
				}
			}
			int size = s.size();
			char* c = new char[size];
			for(int j = 0; j < size; ++j)
			{
				c[j] = s[j];
			}
			sum += atoi(c);
			delete c;
		}
	}
	cout << sum << endl;
}

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