//0064
#include<stdio.h>
#include<stdlib.h>
#include<string.h>

int main(void)
{
	const int N = 80;
	char str[N+1];
	int count = 0;
	while(scanf("%s", str) == 1)
	{
		const char* p = str;
		while( (p = strpbrk(p, "0123456789")) != 0)
		{
			char* nextp;
			int next;
			count += (next = strtol(p, &nextp, 10));
			if(next == 0)
				break;
			p = nextp;
		}
	}
	printf("%d\n", count);
	return 0;
}