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