#include <iostream>
#include <cstdio>
#include <cstring>
#include <sstream>
#include <algorithm>
#include <math.h>
#include <map>
#include <functional>
#include <iomanip>
#include <vector>
#include <queue>
#include <stack>
#include <set>
#include <typeinfo>
#define PI 3.14159265359
#define INF 99999999
#define rep(i, n) for(int i=0; i<n; i++)
#define REP(n) rep(i, n)
#define pb push_back
#define mp make_pair
typedef long long ll;
using namespace std;
typedef pair<int, int> P;

string line;
int ans = 0;
bool prenum = false;
int num = 0;

int main()
{
	while (getline(cin, line))
	{
		for (int i=0; i<line.length(); i++)
		{
			if ('0' <= line[i] && line[i] <= '9')
			{
				if (prenum)
				{
					num *= 10;
					num += line[i] - '0';
				} else {
					num = line[i] - '0';
				}
				prenum = true;
			} else {
				ans += num;
				//printf("num = %d\n", num);
				num = 0;
				prenum = false;
			}
		}
		prenum = false;
		num = 0;
	}

	cout << ans << endl;

	return 0;
}