#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  if (x > y) {
    int v[3] = {c * 2 * x, a * x + b * y, c * 2 * y + a * (x - y)};
    sort(v, v + 3);
    cout << v[0];
  } else {
    int v[3] = {c * 2 * y, a * x + b * y, c * 2 * x + a * (y - x)};
    sort(v, v + 3);
    cout << v[0];
  }
  return 0;
}
