#include <iostream>
using namespace std;

int main()
{
	char str[1000];
	int se = 0, dig = 1, dignum;

	while (cin >> str){
		for (int i = 0; str[i] != '\0'; i++){
			if (str[i] <= '9' && str[i] >= '0'){
				dignum *= 10;
				dignum += str[i] - '0';
			}	
			else {
				se += dignum;
				dignum = 0;
			}
		}
	}
		cout << se << endl;

		return (0);
}