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