#include<iostream>
#include<string>
using namespace std;
string S, T; char U[11] = "0123456789"; int sum;
int main() {
	while (cin >> S) {
		S += ' ';
		for (int i = 0; i < S.size(); i++) {
			for (int j = 0; j < 10; j++) {
				if (U[j] == S[i]) {
					T += S[i]; goto E;
				}
			}
			if (T != "") { sum += stoi(T); }
			T = "";
		E:;
		}
	}
	cout << sum << endl;
}