#include <bits/stdc++.h>
using namespace std;
int main() {
  int A;
  int B;
  int C;
  int X;
  int Y;
  cin >> A >> B >> C >> X >> Y;
  int loop = 0;
  if (X > Y)
    loop = X;
  else {
    loop = Y;
  }
  long long min = 5000 * 10010 * 2;
  for (int i = (0); i < (loop + 1); ++i) {
    long long costA = (X - i) * A;
    long long costB = (Y - i) * B;
    if (costA < 0) costA = 0;
    if (costB < 0) costB = 0;
    long long cost = costA + costB + i * C * 2;
    if (min > cost) min = cost;
  }
  cout << min << endl;
  system("pause");
  return 0;
}
