#include <iostream>

using namespace std;
/** Problem0064 : Secret Number **/
int main()
{
	string s;
	int ans=0, tmp;
	
	while (cin >> s) {
		int len = (int)s.length();
		tmp = 0;
		for (int i=0; i<len; i++) {
			if ('0' <= s[i] && s[i] <= '9') {
				if (tmp>0) {
					tmp*=10; tmp+=s[i]-'0';
				} else
					tmp+=s[i]-'0';
			} else {
				ans+=tmp;
				tmp=0;
			}
		}
		ans += tmp;
	}
	cout << ans << endl;
	
	return 0;
}