#include <string>
#include <iostream>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <vector>
#include <algorithm>
#include <cmath>

using namespace std;

const double EPS = 1e-9;


int main(){
	string s;

	int sum = 0;
	while(getline(cin, s)){
		for(int i = 0; i < s.size(); i++){
			int n = 0;
			while(s[i+n] >= '0' && s[i+n] <= '9'){
				n++;
			}
			sum+= atoi(s.substr(i, n).c_str());
			i += n;
		}
	}

	cout << sum << endl;

    return 0;
}