#include <iostream>
#include <cstring>
#include <cstdlib>

using namespace std;

int main(void)
{
	int input;
	int answer = 0;
	int sum = 0;

	while( input = getchar(),input != EOF ){
		if( input >= '0' && input <= '9' ){
			answer *= 10; answer += input - '0';
		} else {
			sum += answer;
			answer = 0;
		}

	}
	cout << sum << endl;
		
	return 0;
}