#include <iostream>
#include <cstring>
using namespace std;

int main(){
	string str;
	int ans;
	int num;
	
	ans = 0;
	while(cin >> str){
		for(int i = 0; i < str.size(); i++){
			num = 0;
			while(str[i] >= 48 && str[i] <= 57 && i < str.size()){
				num *= 10;
				num += str[i] - 48;
				i++;
			}
			ans += num;
		}
	}
	
	cout << ans << endl;
	
	return 0;
}