#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cstring>
int main()
{
	char buf[128];
	int res = 0;
	while (fgets(buf, 128, stdin)) {
		for (int i = 0; buf[i]; ++i) if (!isdigit(buf[i])) buf[i] = ' ';
		char* p = strtok(buf, " ");
		while (p) { res += atoi(p); p = strtok(NULL, " "); }
	}
	printf("%d\n", res);
	return 0;
}