#include<cstdio>
#include<cstring>
#include<cctype>
#include<cstdlib>
#include<algorithm>
using namespace std;
int main(){
	
	char str[128] = {0};
	int num = 0;
	
	while(scanf("%s",str) != EOF){
		int len = strlen(str);
		
		for(int i = 0; i < len; ){
			if(str[i] < 48 || str[i] > 57){
				i++;
				continue;
			}
			int cnt = 0;
			char g[16]={0};
			
			for(int j = i;;j++){
				if(str[j] < 48 || str[j] > 57){
					num += atoi(g);
					i += cnt;
					break;
				}
				else{
					g[cnt] = str[j];
					cnt++;
				}
			}
		}	
	}
	
	printf("%d\n",num);
	
	return 0;
}