#include<iostream>
#include<cstdlib>
#include<string>
using namespace std;
int main() {
	string a;
	int sum = 0;
	while (getline(cin, a)) {
		for (int i = 0; i < a.length(); i++) {
			if (a[i] >= '0'&&a[i] <= '9') {
				string h = "";
				while (a[i] >= '0'&&a[i] <= '9') {
					h += a[i];
					i++;
				}
				int s = atoi(h.c_str());
				sum += s;
			}
		}
	}
	cout << sum << endl;
}