#include <bits/stdc++.h>
using namespace std;

using db = double;
using ll = long long;
using vi = vector <int>;
#define op operator
#define pb push_back

int main() {
	cout << fixed << setprecision(9);
	ios :: sync_with_stdio(0);

	int ans = 0;
	for(string s; getline(cin, s); ) {
		s += ' '; string t = "";
		for(char c : s)
			if(isdigit(c))
				t += c;
			else if(t.size()) {
				ans += stoi(t);
				t = "";
			}
	}
	cout << ans << '\n';

	return 0;
}