#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
long long MOD = 1000000007;
long long modpow(long long a, long long p, long long mod) {
  if (p == 0) return 1;
  if (p % 2 == 0) {
    long long half = modpow(a, p / 2, mod) % mod;
    return half * half % mod;
  } else {
    return a * modpow(a, p - 1, mod) % mod;
  }
}
long long modCombination(long long n, long long a, long long mod) {
  if (n - a < a) {
    return modCombination(n, n - a, mod);
  }
  long long denominator = 1;
  long long numerator = 1;
  for (long long i = 0; i < a; i++) {
    denominator *= a - i;
    numerator *= n - i;
    denominator %= mod;
    numerator %= mod;
  }
  return numerator * modpow(denominator, mod - 2, mod) % mod;
}
class UnionFind {
 private:
  vector<long long> parents;

 public:
  UnionFind(long long n) : parents(n, -1) {}
  bool issame(long long x, long long y) { return root(x) == root(y); }
  bool merge(long long x, long long y) {
    if (issame(x, y)) return false;
    long long rx = root(x);
    long long ry = root(y);
    if (parents[rx] > parents[ry]) swap(rx, ry);
    parents[rx] += parents[ry];
    parents[ry] = rx;
    return true;
  }
  long long size(long long x) { return -parents[root(x)]; }

 private:
  long long root(long long x) {
    if (parents[x] < 0) return x;
    return parents[x] = root(parents[x]);
  }
};
int main() {
  cout << fixed << setprecision(15);
  long long A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  long long ab_1 = 2 * 2 * (X / 2);
  long long ab_2 = 2 * 2 * (Y / 2);
  long long cost_using_ab_1 =
      max(0LL, (X - ab_1 / 2)) * A + max(0LL, (Y - ab_1 / 2)) * B + ab_1 * C;
  long long cost_using_ab_2 =
      max(0LL, (X - ab_2 / 2)) * A + max(0LL, (Y - ab_2 / 2)) * B + ab_2 * C;
  cout << min(X * A + Y * B, min(cost_using_ab_1, cost_using_ab_2)) << endl;
  return 0;
}
