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

string str;
int res = 0;

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

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

void solve() {
	string tmp = "";
	for (int i = 0; i < str.size(); i++) {
		if (is_number(str[i])) {
			tmp += str[i];
		} else {
			if (tmp.size() == 0) continue;
			res += s2i(tmp);
			tmp = "";
		}
	}
}

int main(int argc, const char *argv[]) {
	while (cin>>str) {
		solve();
	}
	cout<<res<<endl;
	return 0;
}