#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int AB = 2 * C;
  vector<int> V(100000);
  for (int i = 0; i < 100000; i++) {
    V[i] = (i * AB + max(0, X - i) * A + max(0, Y - i) * B);
  }
  cout << *min_element(V.begin(), V.end());
}
