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

const int INF = 1e+9;

int main() {
	string s;
	int ans = 0;
	while(cin >> s){
		int res = 0, cnt = 0, sum = 0;
		for(int i = 0; i < s.size(); ++i){
			if('0' <= s[i] && s[i] <= '9'){
				if(cnt != 0)
					sum *= 10;
				sum += s[i] - '0';
				cnt++;
			}
			else{
				res += sum;
				cnt = 0;
				sum = 0;
			}
		}
		ans += res;
	}
	cout << ans << endl;
	return 0;
}