#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, C, X, Y, s;
  cin >> A >> B >> C >> X >> Y;
  s = A * X + B * Y;
  for (int i = 0; i <= 2 * max(X, Y); i++) {
    s = min(s, max(X - (i - 1) / 2, 0) * A + max(Y - (i - 1) / 2, 0) * B);
  }
  cout << s << endl;
}
