#include <iostream>
#include <string>
#include <vector>
#include <sstream>

#define rep(i,n) for(int i=0;i<n;i++)

using namespace std;

int main()
{
	int sum = 0,num;
	string s;
	stringstream ss;
	while(cin >> s)
	{
		rep(i,s.length())
		{
			if(s[i] < '0' || s[i] > '9')
			{
				s[i]  = ' ';
			}
		}

		ss << s;
		while(ss >> num)
		{
			sum += num;
		}

		ss.str();
		ss.clear(stringstream::goodbit);
	}

	cout << sum << endl;
	return 0;
}