#include <stdio.h>
#include <string.h>

int main(void){
	char str[100];
	int num;
	int code = 0;

	scanf("%d", &num);
	while(scanf("%s", str) != EOF){
		int len = strlen(str);
		for(int i=0; i<len; i++){
			if(str[i] >= '0' && str[i] <= '9'){
				int temp = i;
				while(str[i] != '\0' && str[i] >= '0' && str[i] <= '9'){
					i++;
				}
				str[i] = '\0';
				sscanf(&str[temp], "%d", &num);
				code += num;
			}
		}
	}
	printf("%d\n", code);

	return 0;
}