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