#include <bits/stdc++.h>
int main(int argc, const char* argv[]) {
  int A, B, C, X, Y, count;
  std::cin >> A >> B >> C >> X >> Y;
  count = A * X + B * Y + 2 * C * (X + Y);
  for (int i = 0; i <= std::max(X, Y); i++) {
    count = std::min(
        count, C * 2 * i + A * std::max(0, (X - i)) + B * std::max((Y - i), 0));
  }
  std::cout << count << std::endl;
  return 0;
}
