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