#include "bits/stdc++.h"
using namespace std;
int main() {
	string s;
	int sum=0 ;
	bool flag = false;
	int ans = 0;
	vector<int> vi;
	while (cin >> s) {
		for (int i = 0; i < s.length(); ++i) {
			if (9 >= (s[i] - '0') && 0 <= (s[i] - '0')) {
				if (flag) {
					ans++;
					vi.push_back(s[i] - '0');
				} else {
					ans = 1;
					vi.push_back(s[i] - '0');
					flag = true;
				}
			} else {
				if (flag) {
					for (int i = 0; i < ans; ++i) {
						sum =(sum +(vi[i] * pow(10, ans - 1 - i)));
					}
					flag = false;
					ans=0;
				}
			}
		}
	}
	cout<<sum<<endl;
}