#include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <numeric>
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <fstream>
using namespace std;
int stoi (string str)
{
	stringstream ss(str);
	int n;
	ss >> n;

	return n;
}

int main()
{
//	cut here before submit 
//	freopen("testcase.secret", "r", stdin);
	string str = "";
	int sum = 0;

	while (getline (cin, str ) ){
		if (str.empty() ){
			break;
		} // end if
		int len = str.length();
		int i;

		string num = "";
		for (i = 0; i < len; ++i){
			if (isdigit(str[i]) ){
				num += str[i];
			}else if (!num.empty() ){
				sum += stoi (num);
				num = "";
			} // end if
		} // end for
	} // end loop

	cout << sum << endl;	
		
	return 0;
}