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