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