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