#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int a, b, c, d, e, x, y;
  int p;
  bool f = 0;
  std::cin >> a >> b >> c >> x >> y;
  d = x;
  e = y;
  if (d < e) {
    swap(d, e);
    f = 1;
  }
  if (a * e + b * e > c * 2 * e && a * x + b * y < c * 2 * d) {
    if (f == 0) {
      p = c * 2 * e + a * (d - e);
    } else {
      p = c * 2 * e + b * (d - e);
    }
  }
  if (a * x + b * y >= c * 2 * d) {
    p = c * 2 * d;
  }
  if (a * e + b * e <= c * 2 * e) {
    p = a * x + b * y;
  }
  std::cout << p << '\n';
  return 0;
}
