#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<utility>
#include <functional>
#include <set>
#include <map>
#include <queue>
#include <cmath>
#include <stack>

using namespace std;



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