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

int main()
{
	string s;
	int ans = 0;
	while(cin >> s){
		string t;
		for(int i = 0; i < s.size(); ++i){
			if('0' <= s[i] && s[i] <= '9'){
				t.push_back(s[i]);
			} else {
				ans += atoi(t.data());
				t.clear();
			}
		}
		if(t.size()){
			ans += atoi(t.data());
		}
	}
	cout << ans << endl;
}