#include<iostream>
#include<string>
#include<vector>
using namespace std;
int f(int a) {
	if (a == 0)return 1;
	return 10*f(a - 1);
}
int main() {
	string s; 
	int ans = 0;
	while (getline(cin, s)) {
		vector<int>v;
		for (int i = 0; i < s.size(); i++){
			if (s[i] == '1')v.push_back(1);
			else if (s[i] == '2')v.push_back(2);
			else if (s[i] == '3')v.push_back(3);
			else if (s[i] == '4')v.push_back(4);
			else if (s[i] == '5')v.push_back(5);
			else if (s[i] == '6')v.push_back(6);
			else if (s[i] == '7')v.push_back(7);
			else if (s[i] == '8')v.push_back(8);
			else if (s[i] == '9')v.push_back(9);
			else if (s[i] == '0')v.push_back(0);
			else if (v.size() != 0) {
				for (int i = 0; i < v.size(); i++)
					ans += f(v.size() - 1 - i)*v[i];
				v.clear();
			}
		}
	}
	cout << ans << endl;
}