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