#include <bits/stdc++.h>
int main() {
  int A, B, C, X, Y, cost, m, left;
  std::cin >> A >> B >> C >> X >> Y;
  if (2 * C >= A + B) {
    cost = A * X + B * Y;
  } else {
    m = std::min(X, Y);
    cost = 2 * C * m;
    left = std::max(X, Y) - m;
    cost += std::min({2 * C * left, A * left, B * left});
  }
  std::cout << cost << std::endl;
  return 0;
}
