#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const long long INF = 1e18;
const long long dx4[4] = {1, 0, -1, 0};
const long long dy4[4] = {0, 1, 0, -1};
const long long dx8[8] = {1, 1, 0, -1, -1, -1, 0, 1};
const long long dy8[8] = {0, 1, 1, 1, 0, -1, -1, -1};
const double pi = acos(-1);
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) { return b ? gcd(b, a % b) : a; }
struct edge {
  long long to;
  long long cost;
};
using Graph = vector<vector<edge>>;
Graph G;
struct UnionFind {
  vector<long long> data;
  void init(long long n) { data.assign(n, -1); }
  bool unionSet(long long x, long long y) {
    x = root(x);
    y = root(y);
    if (x != y) {
      if (data[y] < data[x]) swap(x, y);
      data[x] += data[y];
      data[y] = x;
    }
    return x != y;
  }
  bool findSet(long long x, long long y) { return root(x) == root(y); }
  long long root(long long x) {
    return data[x] < 0 ? x : data[x] = root(data[x]);
  }
  long long size(long long x) { return -data[root(x)]; }
};
void solve() {
  std::ifstream in("sample.txt");
  std::cin.rdbuf(in.rdbuf());
  cin.tie(0);
  ios::sync_with_stdio(false);
  long long a, b, c;
  cin >> a >> b >> c;
  long long x, y;
  cin >> x >> y;
  long long tmp0 = a * x + b * y;
  long long tmp1 = c * (max(x, y) + 1) / 2;
  cout << min(tmp0, tmp1) << endl;
}
signed main() {
  solve();
  return 0;
}
