#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <functional>

using namespace std;

int main()
{
	int res = 0;
	string buffer;

	while ( getline( cin, buffer ) )
	{
		for ( unsigned int i = 0; i < buffer.length(); i++ )
		{
			if ( isdigit( buffer[i] ) )
			{
				continue;
			}
			else
			{
				buffer[i] = ' ';
			}
		}

		int num;
		istringstream iss( buffer );

		while ( iss >> num )
		{
			res += num;
		}
	}

	cout << res << endl;

	return 0;
}