#include <bits/stdc++.h>
using namespace std;
inline double avg(double x, double y) { return (x + y) / 2; }
int main() {
  int x, y, price_a, price_b, price_ab, final_cost = 0, add1, add2;
  cin >> price_a >> price_b >> price_ab >> x >> y;
  if (price_ab * 2 < avg(price_a, price_b)) {
    final_cost += min(x, y) * price_ab;
    y = y - min(x, y);
    x = x - min(x, y);
  }
  final_cost += y * min(price_b, price_ab * 2);
  if (price_ab * 2 < price_b) {
    x = x - y;
  }
  if (x > 0) {
    final_cost += x * min(price_a, price_ab * 2);
  }
  cout << final_cost;
  return 0;
}
