#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using vd = vector<double>;
using vs = vector<string>;
using vb = vector<bool>;
using vvi = vector<vi>;
using vvl = vector<vl>;
using vvd = vector<vd>;
using vvb = vector<vb>;
using pii = pair<int, int>;
using pil = pair<int, ll>;
using pli = pair<ll, int>;
using pll = pair<ll, ll>;
using pdd = pair<double, double>;
using vpii = vector<pii>;
using vpll = vector<pll>;
using vpdd = vector<pdd>;
using ti3 = tuple<int, int, int>;
using tl3 = tuple<ll, ll, ll>;
using td3 = tuple<double, double, double>;
using ti4 = tuple<int, int, int, int>;
using tl4 = tuple<ll, ll, ll, ll>;
using td4 = tuple<double, double, double, double>;
using mii = map<int, int>;
using mil = map<int, ll>;
using mli = map<ll, int>;
using mll = map<ll, ll>;
using si = set<int>;
using sl = set<ll>;
int A, B, C;
int X, Y;
ll solve(int z) {
  ll res = C * 2 * z;
  res += A * max(X - z, 0);
  res += B * max(Y - z, 0);
  return res;
}
int main() {
  const ll INF = 1e18 + 7;
  cin >> A >> B >> C;
  cin >> X >> Y;
  ll ans = INF;
  for (ll z = 0; z <= 2e5; z += 2) {
    ans = min(ans, solve(z));
  }
  cout << ans << "\n";
}
