// 2011/04/04 Tazoe

#include <iostream>
using namespace std;

int main()
{
	int sum = 0;

	while(true){
		char c;
		cin.get(c);
		if(cin.eof())
			break;

		if(c>='0'&&c<='9'){
			int num = c-'0';
			while(true){
				cin.get(c);
				if(!(c>='0'&&c<='9'))
					break;
				num = num*10+(c-'0');
			}
			sum += num;
		}
	}

	cout << sum << endl;

	return 0;
}