#include <bits/stdc++.h>
using namespace std;
int main() {
  int h, w, i, j, halfkosu;
  double a, b, c, x, y, halfvalue, ans = 0;
  bool flg;
  cin >> a >> b >> c >> x >> y;
  halfvalue = min((a + b) / 2, c);
  halfkosu = min(x, y);
  if (x > y) {
    if ((x - y) * b > (x - y) * halfvalue * 2) {
      halfkosu = x;
      y = x;
    }
  } else if (y > x) {
    if ((y - x) * a > (y - x) * halfvalue * 2) {
      halfkosu = y;
      x = y;
    }
  }
  ans = halfkosu * 2 * halfvalue + a * (x - halfkosu) + b * (y - halfkosu);
  std::cout << ans << std::endl;
  return 0;
}
