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

int main(void)
{
	int i, j;
	int n;
	int num;
	char str[128];
	int ans;
	int len;
	
	ans = 0;
	while (fgets(str, 100, stdin) != NULL){
		n = 0;
		len = strlen(str);
		for (i = 0; i < len; i++){
			if (str[i] >= '0' && str[i] <= '9'){
				n++;
			}
			else {
				num = 0;
				for (j = 0; j < n; j++){
					num *= 10;
					num += str[i - n + j] - '0';
				}
				n = 0;
				ans += num;
			}
		}
	}
	printf("%d\n", ans);
	
	return (0);
}