#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int price1, price2, price3;
  int d = min(X, Y);
  if (d == Y) {
    int AB = d * (X / Y) * 2;
    price1 = AB * C;
    if (A < C)
      price1 += abs((X - AB)) * A;
    else
      price1 += abs((X - AB)) * C;
  } else if (d == X) {
    int AB = d * (Y / X) * 2;
    price1 = AB * C;
    if (B < C)
      price1 += abs((Y - AB)) * B;
    else
      price1 += abs((Y - AB)) * C;
  }
  price3 = X * A + B * Y;
  int Erg = min(price1, price3);
  cout << Erg;
  return 0;
}
