#include <bits/stdc++.h>
using namespace std;
void solve() {}
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int simple_sum = x * a + y * b;
  int c_sum = max(x, y) * c * 2;
  int ab_amount;
  int a_amount;
  int b_amount;
  if (x < y) {
    int xquot = x / 2;
    int yquot = y / 2;
    int amod = x % 2;
    int bmod = y - 2 * xquot;
    ab_amount = 2 * c * xquot * 2;
    a_amount = a * amod;
    b_amount = b * bmod;
  } else {
    int xquot = x / 2;
    int yquot = y / 2;
    int amod = x - 2 * yquot;
    int bmod = y % 2;
    ab_amount = 2 * c * yquot * 2;
    a_amount = a * amod;
    b_amount = b * bmod;
  }
  int opt_sum = ab_amount + a_amount + b_amount;
  cout << min(min(simple_sum, c_sum), opt_sum) << endl;
}
