#include <bits/stdc++.h>
using namespace std;
template <typename T>
using reversed_priority_queue =
    std::priority_queue<T, std::vector<T>, std::greater<T> >;
signed main() {
  long long int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  if (a + b <= 2 * c) {
    cout << (a * x + b * y) << endl;
  } else {
    long long int z = min(x, y) * 2;
    cout << (a * (x - z / 2) + b * (y - z / 2) + c * z) << endl;
  }
  return 0;
}
