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