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