#include <bits/stdc++.h>
using namespace std;
int main() {
  long a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  long tmpcost = 100000 * 5000;
  for (long i = 0; i <= max(2 * x, 2 * y); i++) {
    long cost = 0;
    cost += c * i;
    if (x - i / 2 > 0) cost += a * (x - i / 2);
    if (y - i / 2 > 0) cost += b * (y - i / 2);
    if (cost < tmpcost) {
      tmpcost = cost;
    }
  }
  cout << tmpcost << endl;
}
