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

using namespace std;

int main(void)
{
	char input[100];
	int answer = 0;

	while( cin.getline( input, 100 ) ){
		for( int i = 0;i < 100;i++ ){
			if( input[i] < '0' || input[i] > '9' ) input[i] = '\0';
		}

		for( int i = 0;i < 100;i++ ){
			if( input[i] >= '0' && input[i] <= '9' ){
				answer += atoi( input + i );
				for( int j = i;j < 100;j++ ){
					if( input[j] >= '0' && input[j] <= '9' )
						input[j] = '\0';
					else if( input[j] == '\0' ) break;
				}
			}
		}
	}
	cout << answer << endl;
	return 0;
}