#include<iostream>
#include<cstdlib>
#include<string>
#include<cstring>
using namespace std;

int main(){
	char input[80];
	int num = 0;
	char charNum[5];
	int cont;
	while(cin >> input){
		for(int i=0; i < strlen(input); i++){
			if('0'<= input[i] && input[i] <= '9'){
				for(int j=0; '0' <= input[i+j] && input[i+j] <= '9'; j++){
					charNum[j] = input[i+j];
					cont = j;
				}
				num += atoi(charNum);
				i += cont;
				for(int i=0; i < 5; i++){
					charNum[i] = '\0';
				}
			}
		}
	}
	cout << num << endl;
}