#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  long int price, minPrice, max;
  if (X > Y)
    max = X;
  else
    max = Y;
  minPrice = 1000000000000000;
  for (int k = 0; k <= 2 * max; k++) {
    for (int i = 0; 2 * i + k <= 2 * X; i++) {
      for (int j = 0; 2 * j + k <= 2 * Y; j++) {
        if (2 * X == 2 * i + k && 2 * Y == 2 * j + k) {
          price = A * i + B * j + C * k;
          if (price < minPrice) {
            minPrice = price;
          }
        }
      }
    }
  }
  cout << minPrice << endl;
}
