#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int c, A, B, C, x, y;
  unsigned int answer = 5000000000;
  cin >> A >> B >> C >> x >> y;
  for (c = 1; c <= 100000; ++c) {
    unsigned int money = c * 2 * C + max(0, x - c) * A + max(0, y - c) * B;
    answer = min(answer, money);
  }
  cout << answer << endl;
  return 0;
}
