#include <cstdio>
#include <ctype.h>

using namespace std;

int main(void){
	int sum = 0, val;
	char c;
	while((c = getchar()) != EOF){
		if(isdigit(c)){
			val = c - '0';
			while(isdigit(c = getchar())){
				val = val * 10 + c - '0';
			}
			sum += val;
		}
	}
	printf("%d\n",sum);
	return 0;
}