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