#include <bits/stdc++.h>
int main() {
  int A, B, C, X, Y;
  std::cin >> A >> B >> C >> X >> Y;
  double coe = C - A / 2 - B / 2;
  int ans = 0;
  if (coe >= 0)
    ans = A * X + B * Y;
  else {
    int max = X;
    if (max < Y) max = Y;
    int Nc = 2 * max;
    int min;
    for (int i = 1; i <= Nc; i++) {
      int Na = std::max(0, X - i / 2);
      int Nb = std::max(0, Y - i / 2);
      int tmp = Na * A + Nb * B + i * C;
      if (i == 1)
        min = tmp;
      else if (min > tmp)
        min = tmp;
    }
    ans = min;
  }
  std::cout << ans << std::endl;
  return 0;
}
