#include<cstdio>

int main(){
	int sum = 0;
	int temp = 0;
	char c;
	while(~scanf("%c",&c)){
		if('0' <= c && c <= '9'){
			temp *= 10;
			temp += c - '0';
		}else{
			sum += temp;
			temp = 0;
		}
	}
	sum += temp;
	printf("%d\n", sum);
}