#include<iostream>
#include<string>
using namespace std;

int main() {
	string s;
	int sum = 0;
	while (getline(cin, s)) {
		string sa;
		for (int i = 0;i < s.size();i++) {
			if (s[i] >= '0'&&s[i] <= '9') {
				sa.push_back(s[i]);
			}
			else {
				if (i != 0 && s[i - 1] >= '0'&&s[i - 1] <= '9') {
					int a = stoi(sa);
					sum += a;
					sa.clear();
				}
			}
		}
		if (!sa.empty() && sa[s.size() - 1] >= '0'&&sa[s.size() - 1] <= '9') {
			int a = stoi(sa);
			sum += a;
			sa.clear();
		}
	}
	cout << sum << endl;
	return 0;
}