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

using namespace std;

int main()
{
	char s[0x10000];
	
	int sum = 0;
	while(scanf("%s", s) != EOF){
		int x = 0;
		for (int i = 0; s[i]; i++){
			if (isdigit(s[i])){
				x = x * 10 + (s[i] - '0');
			}
			else {
				sum += x;
				x = 0;
			}
		}
		sum += x;
	}
	
	printf("%d\n", sum);
	
	return(0);
}