#include <iostream>
#include <stdlib.h>
#include <string>

using namespace std;

void solve()
{
	int ans = 0;
	string str;
	while(cin >> str)
	{
		string num_str;
		for(int i = 0; i < str.size(); ++i)
		{
			if('0' <= str[i] && str[i] <= '9')
			{
				num_str += str[i];
			}
			else
			{
				ans += atoi(num_str.c_str());
				num_str = "";
			}
		}
	}
	cout << ans << endl;
}

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