#include <bits/stdc++.h>
using namespace std;
int main() {
  long a, b, c, x, y, sum;
  cin >> a >> b >> c >> x >> y;
  if (x > y) {
    swap(x, y);
    swap(a, b);
  }
  if (a + b < 2 * c) c = (a + b) / 2;
  sum = 2 * c * x + (y - x) * b;
  if (sum > 2 * c * y) sum = 2 * c * y;
  cout << sum << endl;
}
