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