#include <bits/stdc++.h>
using namespace std;
template <typename T>
void print(T x) {
  std::cout << x << '\n';
}
long long a, b, c, x, y;
signed main() {
  cin >> a >> b >> c >> x >> y;
  if (x == 0 && y == 0) {
    cout << 0 << endl;
    return 0;
  }
  if (y == 0) {
    cout << min(a * x, 2 * c * x) << endl;
    return 0;
  }
  if (x == 0) {
    cout << min(b * y, 2 * c * y) << endl;
  }
  long long ans = 1e9;
  for (long long i = 0; i < (100000); i++) {
    long long temp =
        i * 2 * c + max(0, (signed)(x - i)) * a + max(0, (signed)(y - i)) * b;
    ans = min(ans, temp);
  }
  cout << ans << endl;
  return 0;
}
