#include<iostream>
using namespace std;

int main(){
	int a, b, c, x, y, sum;
	cin >> a >> b >> c >> x >> y;
	sum = a * x + b * y;
	if(sum > max(a, b) * c) sum = max(a, b) * c
	if(x > y) {
		if((x-y)*a + y *c < sum) sum = (x-y)*a + y *c;
	}else{
		if((y-x)*b + x *c < sum) sum = (y-x)*b + x *c;
	}
	cout << sum;
	return 0;
}
