#include <bits/stdc++.h>
int needleX[4] = {-1, 0, 1, 0};
int needleY[4] = {0, 1, 0, -1};
int main(void) {
  int A, B, AB, X, Y;
  std::cin >> A >> B >> AB >> X >> Y;
  int smallxy = std::min(X, Y), bigxy = std::max(X, Y);
  int ans = (1 << 21), a[4];
  a[3] = (1 << 21);
  a[0] = 2 * AB * bigxy;
  a[1] = X * A + Y * B;
  a[2] = 2 * AB * smallxy;
  if (X > Y) {
    a[3] = 2 * AB * smallxy + (X - Y) * A;
  } else if (Y > X) {
    a[3] = 2 * AB * smallxy + (Y - X) * B;
  }
  for (int i = 0; i < 4; i++) {
    ans = std::min(ans, a[i]);
  }
  std::cout << ans << std::endl;
  return 0;
}
