#include <bits/stdc++.h>
int main() {
  std::cin.tie(0);
  std::ios::sync_with_stdio(false);
  int64_t A, B, C, X, Y;
  std::cin >> A >> B >> C >> X >> Y;
  constexpr int64_t INF = 1LL << 60;
  int64_t min_sum = INF;
  min_sum = std::min(min_sum, A * X + B * Y);
  if (X >= Y) {
    min_sum = std::min(min_sum, C * 2 * Y + A * (X - Y));
    min_sum = std::min(min_sum, C * 2 * X);
  } else {
    min_sum = std::min(min_sum, C * 2 * X + A * (Y - X));
    min_sum = std::min(min_sum, C * 2 * Y);
  }
  std::cout << min_sum << std::endl;
  return 0;
}
