#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  long long sum1 = 0;
  long long sum2 = 0;
  sum1 = A * X + B * Y;
  if (X >= Y) {
    sum2 = B * 2 * Y + A * (X - Y);
  } else {
    sum2 = A * 2 * X + B * (Y - X);
  }
  if (sum1 >= sum2) {
    cout << sum2 << endl;
  } else {
    cout << sum1 << endl;
  }
  return 0;
}
