#include<cstdio>

using namespace std;

int answer=0;
char str[100];

int main()
{
	while(scanf("%s",str)!=EOF)
	{
		int k=1;
		for(int i=80;i>=0;i--)
		{
			if('0'<=str[i]&&str[i]<='9')
			{
				answer+=k*(str[i]-'0');
				k*=10;
			}
			else k=1;
		}
	}
	printf("%d\n",answer);
}