#include <cstdio>
#include <cstring>
using namespace std;

int main(void)
{
	unsigned long long res = 0, num = 0;
	char str[128];
	bool flag = true;
	
	while (scanf("%s", str) != EOF){
		int len = strlen(str);
		for (int i = 0; i < len; i++){
			if ('0' <= str[i] && str[i] <= '9'){
				for (int j = i; j < len; j++){
					if ('0' <= str[i] && str[i] <= '9') {
						num *= 10;
						num += str[i] - '0';
						i++;
					}
					else break;
				}
			}
			res += num;
			num = 0;
		}
	}
	
	printf("%llu\n", res);
	
	return (0);
}