#include <fstream>
#include <string>
#include <sstream>

using namespace std;

int main()
{
	ifstream input("bai5b.inp");
	ofstream output("bai5b.out");

	string a;
	getline(input, a);
	int b;
	int total = 0;
	for (int i = 0; i < a.length(); i++)
	{
		if (a[i] < 48 || a[i] > 57)
		{
			a[i] = (char)32;
		}
	}
	stringstream ss(a);
	while (ss >> b)
	{
		total += b;
	}
	output << total;
	input.close();
	output.close();
}