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