#include <stdio.h>
#include<math.h>
#include <algorithm>
using namespace std;

int main(){
	char buf[81];
	int sum = 0,tmp;

	while(scanf("%s",buf)!=EOF){
		tmp = 0;
		for(int i=0;buf[i] != '\0';i++){
			if(buf[i] >= 48 && buf[i] <= 57){
				tmp = 10*tmp + (buf[i] - '0');
				if(buf[i+1] == '\0'){
					sum += tmp;
				}
			}else{
				if(buf[i-1] >= 48 && buf[i-1] <= 57){
					sum += tmp;
					tmp = 0;
				}
			}
		}
	}

	printf("%d\n",sum);

    return 0;
}

