#include <iostream>
#include <sstream>
using namespace std;

int main()
{
	int n,sum=0;
	char str[128];
	while(cin >> str)
	{
		for(int i=0; str[i]; i++)
		{
			if(str[i]<'0' || '9'<str[i])
			{
				str[i] = ' ';
			}
		}
		stringstream ss;
		ss << str;
		while(ss >> n)
		{
			sum+=n;
		}
	}
	cout << sum << endl;
}