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

int main()
{
	string s;
	int res = 0, tmp = 0;
	while(getline(cin, s)){
		for(auto c : s){
			if(isdigit(c)){
				tmp = tmp * 10 + c - '0';
			}
			else{
				res += tmp;
				tmp = 0;
			}
		}
		res += tmp;
		tmp = 0;
	}
	cout << res << endl;
	return 0;
}