#include <iostream>
using namespace std;

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