#include <iostream>
#include <string>
#include <cmath>
#include <cstdio>
#include <cstring>
using namespace std;
int main()
{
	int n=0,sum=0;
	char c;
	while((c=getchar())!=EOF)
	{
		if(c>='0'&&c<='9')
		{
			n*=10;
			n+=(c-('0'));
		}
		else
		{
			sum+=n;
			n=0;
		}
	}
	cout << sum << endl;
	return 0;
}