#include <iostream>
using namespace std;
int main() {
	char c;
	int t = 0, ans = 0;
	while((c = getchar()) != EOF) {
		if('0' <= c && c <= '9') {
			t *= 10;
			t += c - '0';
		}
		else {
			ans += t;
			t = 0;
		}
	}
	cout << ans << endl;
}