#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS

#include <iostream>
#include <string>
#include <sstream>
#include <iomanip>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <bitset>
#include <utility>
#include <numeric>

using namespace std;

using ll = long long;
using ull = unsigned long long;

const ll inf = (ll)1e9;
const ll mod = (ll)1e9 + 7;

int main()
{
	string s;

	ll sum = 0;
	while (cin >> s)
	{
		ll add = 0;
		for (int i = 0; i < s.length(); i++)
		{
			char c = s.at(i);
			if ('0' <= c && c <= '9')
			{
				add = add * 10 + (c - '0');
			}
			else
			{
				sum += add;
				add = 0;
			}
		}

		sum += add;
	}


	cout << sum << endl;
}
