#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 ('a' <= str[i] && str[i] <= 'z'){
				flag = true;
			}
			if (flag && '0' <= str[i] && str[i] <= '9'){
				num *= 10;
				num += (str[i] - '0');
			}
			else if (!('0' <= str[i + 1] && str[i + 1] <= '9')){
				flag = false;
				res += num;
				num = 0;
			}
		}
	}
	
	printf("%llu\n", res);
	
	return (0);
}