#include <iostream>
#include <string>

using namespace std;

int main() {
	string b;
	int sum = 0;
	while (getline(cin, b)) {
		while (b.find('.', 0) != string::npos) {
			int p = b.find('.', 0);
			int counter = 0;
			for (int i = 0; i < p; i++) {
				if (0 <= b[i]-'0' && b[i]-'0' <= 9) {
					counter *= 10;
					counter += b[i]-'0';
				} else {
					if (counter > 0) {
						sum += counter;
						counter = 0;
					}
				}
			}
			if (counter > 0) {
				sum += counter;
			}
			b = b.substr(p+1);
		}
	}
	cout << sum << endl;
	return 0;
}