#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <functional>
#include <queue>
#include <set>
#include <map>
#include <numeric>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cctype>

#define rep(i, a) REP(i, 0, a)
#define REP(i, a, b) for(int i = a; i < b; ++i)

typedef long long ll;
typedef unsigned long long ull;
typedef std::pair<int, int> P;
typedef std::pair<P, int> PP;
struct edge{ int to, time, cost; };
const double eps = 1e-9;
const int infi = (int)1e+9 + 10;
const ll infll = (ll)1e+17 + 10;
const double infd = (double)1e+9;

int sum = 0;
std::string str;
std::string::iterator it;

int number(){
	int ret = 0;
	while (isdigit(*it)){
		ret *= 10;
		ret += (*it - '0');
		++it;
	}
	return ret;
}

int main(){
	while (std::cin >> str){
		it = str.begin();
		while (it != str.end()){
			if (isdigit(*it))sum += number();
			++it;
		}
	}
	std::cout << sum << std::endl;
	return 0;
}