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