#include <iostream>
using namespace std;

int main(){
	string s;
	int ans = 0;
	while(getline(cin, s)){
		//if(s == "ab")break;
		for(int i = 0;i < s.size();i++){
			if('0' <= s[i] && s[i] <= '9'){
				int tmp = s[i++] - '0';
				while('0' <= s[i] && s[i] <= '9'){
					tmp *= 10;
					tmp += s[i++]-'0';
				}
				ans += tmp;
			}
		}
	}
	cout << ans << endl;
	return 0;
}