#include <bits/stdc++.h>
using namespace std;
constexpr long long int INFLL = 1001001001001001LL;
constexpr long long int infll = 1001001001001001LL;
constexpr int INF = 1000000007;
constexpr int inf = 1000000007;
const int mod = 1000000007;
template <class T>
inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
long long gcd(long long a, long long b) {
  if (a % b == 0) {
    return (b);
  } else {
    return (gcd(b, a % b));
  }
}
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
inline double nCr(const int n, int r) {
  if (n == 0) {
    return 0;
  }
  if (r == 0) {
    return 1;
  }
  if (r == 1) {
    return n;
  }
  if (n == r) {
    return 1;
  }
  if (r > n / 2) {
    r = n / 2;
  }
  double result = 1;
  for (double i = 1; i <= r; i++) {
    result *= (n - i + 1) / i;
  }
  return (result);
}
template <typename T>
T seinomi(T a) {
  if (a > 0) {
    return a;
  } else {
    return 0;
  }
}
int main() {
  long long a, b, c;
  long long x, y;
  cin >> a >> b >> c >> x >> y;
  long long ab = c * 2;
  long long ans = infll;
  for (int i = 1; i <= max(x, y); i++) {
    long long sum = ab * i + seinomi(x - i) * a + seinomi(y - i) * b;
    chmin(ans, sum);
  }
  cout << ans << endl;
}
