#include<iostream>
using namespace std;

int main()
{
	char character = '0';
	int ansho=0;
	int temp = 0;
	while(cin >> character)
	{

		if('0'<=character&&character<='9')
		{
			temp = temp*10 + character -'0';
		}
		else {ansho += temp;temp =0;}
	}
	cout << ansho;
	return 0;
}