#include <bits/stdc++.h>
using namespace std;
int main() {
  long long A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  C += C;
  long long result = min(X, Y) * C;
  long long nokori, Z, W;
  if (X > Y) {
    nokori = X - Y;
    if (X > C) {
      result = result + nokori * C;
    } else {
      result = result + nokori * A;
    }
  } else {
    nokori = Y - X;
    if (Y > C) {
      result = result + nokori * C;
    } else {
      result = result + nokori * B;
    }
  }
  Z = A * X + B * Y;
  W = max(X, Y) * C;
  long long P = min(Z, result);
  long long Q = min(Z, W);
  cout << min(P, Q) << endl;
}
