#include <iostream>
#include <string>
#include <sstream>
#include <cstring>
using namespace std;
typedef long long ll;

const int MAX_N = 1000;
string str;
ll res = 0;

ll s2i(string s) {
	stringstream ss(s);
	ll i;
	ss >> i;
	return i;
}

bool is_number(char c) {return '0' <= c && c <= '9';}

int c2i(char c) {return c - '0';}

int sum[MAX_N];

void solve() {
	int loc = 0;
	for (int i = str.size()-1; i >= 0; i--) {
		if (is_number(str[i])) {
			sum[loc] += c2i(str[i]);
			loc++;
		} else {
			loc = 0;
		}
	}
}

int main(int argc, const char *argv[]) {
	memset(sum, 0, sizeof sum);
	while (cin>>str) {
		solve();
	}
	// advance
	for (int i = 0; i < MAX_N-1; i++) {
		if (sum[i] > 9) {
			sum[i+1] += sum[i] / 10;
			sum[i] %= 10;
		}
	}
	// print
	bool flag = false;
	for (int i = MAX_N-1 ; i >= 0; i--) {
		if (sum[i] == 0 && !flag) continue;

		cout<<sum[i];
		flag = true;
	}
	cout<<endl;
	return 0;
}