#include <iostream>
#include <string>
#include <algorithm>
#include <sstream>
using namespace std;

int main(void)
{
	string str;
	int sum = 0, num;

	while (cin >> str)
	{
		for (int i = 0; i < str.size(); i++) if (str[i] < '0' || str[i] > '9') str[i] = ' ';
		stringstream s(str);
		while (s >> num) sum += num;
	}
	cout << sum << endl;
	return 0;
}
