#include <bits/stdc++.h>
constexpr double PI = 3.141592653589793;
constexpr long long INF = 1e18 + 10;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  long long a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  long long maxi = max(x * 2, y * 2);
  long long sum = 1 << 29;
  for (long long cnum = 0; cnum <= maxi; cnum++) {
    long long bnum = max(y - cnum, 0ll);
    long long anum = max(x - cnum, 0ll);
    long long current = anum * a + bnum * b + cnum * c * 2;
    if (sum > current) {
      sum = current;
    }
  }
  cout << sum << "\n";
  return 0;
}
