#include <cstdio>
#include <cstdlib>
#include <cstring>

using namespace std;

int main()
{
	char s[100];
	int sum = 0;
	
	while(scanf("%s", s) != EOF){
		
		for(int i = 0; s[i] != '\0'; i++){
			bool ok = false;
			char num[1000] = {'0'};
			int j = 0;
			while(s[i] >= '0' && s[i] <= '9'){
				num[j] = s[i];
				i++;
				j++;
				ok = true;
			}
			if (ok) {
				sum += atoi(num);
			}
		}
	}
	
	printf("%d\n", sum);
	
	return(0);
}