#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int minSumprice = 0;
  for (int c = 0; c < (X + Y) * 2; c++) {
    int aCount = 0;
    int bCount = 0;
    int cCount = 0;
    if (X > c) aCount = X - c;
    if (Y > c) bCount = Y - c;
    cCount = 2 * c;
    int sumPrice = cCount * C + aCount * A + bCount * B;
    if (c == 0)
      minSumprice = sumPrice;
    else if (sumPrice < minSumprice)
      minSumprice = sumPrice;
  }
  cout << minSumprice << endl;
  return 0;
}
