#include<iostream>
#include<string>
#include<cstdlib>
using namespace std;

int main() {
	string sentence; string num_tmp; int num=0;
	while(cin>>sentence) {
		num_tmp = "";
		for (int i = 0; i < sentence.size(); i++) {
			if (47 < sentence[i] &&sentence[i]< 58) {
				num_tmp += sentence[i];
			}
			else {
				num += atoi(num_tmp.c_str());
				num_tmp = "";
			}
		}
		num += atoi(num_tmp.c_str());
	}
	cout << num << endl;
}
