#include <bits/stdc++.h>
using namespace std;
const double PI = 3.14159265358979323846;
vector<pair<long long, long long>> prime_factorize(long long n) {
  vector<pair<long long, long long>> res;
  for (long long p = 2; p * p <= n; ++p) {
    if (n % p != 0) continue;
    int num = 0;
    while (n % p == 0) {
      ++num;
      n /= p;
    }
    res.push_back(make_pair(p, num));
  }
  if (n != 1) res.push_back(make_pair(n, 1));
  return res;
}
vector<long long> calc_divisor(long long n) {
  vector<long long> res;
  for (long long i = 1LL; i * i <= n; ++i) {
    if (n % i == 0) {
      res.push_back(i);
      long long j = n / i;
      if (j != i) res.push_back(j);
    }
  }
  sort(res.begin(), res.end());
  return res;
}
long long int gcd(long long int x, long long int y) {
  return y ? gcd(y, x % y) : x;
}
long long int gcd(const vector<long long int> &v) {
  long long int ret = v[0];
  for (long long int i = 1; i < v.size(); i++) ret = gcd(ret, v[i]);
  return ret;
}
long long int lcm(long long int x, long long int y) {
  return x / gcd(x, y) * y;
}
long long int lcm(const vector<long long int> &v) {
  long long int ret = v[0];
  for (long long int i = 1; i < v.size(); i++) ret = lcm(ret, v[i]);
  return ret;
}
vector<pair<long long, long long>> g[200020];
long long int s[200020];
bool used[200020];
long long int A, B, C, D, H, K, M, N, Q, T, W, X, Y;
double dA, dB, dC, dH, dK, dM, dN, dQ, dT, dW, dX, dY;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  long long ans, sum, cnt, cnt1, flg, flg1, flg2;
  long long max, max1;
  long long min, min1;
  long long wk, wk1;
  max = max1 = wk = wk1 = sum = ans = cnt = cnt1 = flg1 = flg2 = 0;
  min = min1 = 1e18 + 5;
  double dwk, dwk1, dsum, dsum1, dans, dans1;
  dwk = dwk1 = dsum = dsum1 = dans = dans1 = 0;
  cin >> A >> B >> C >> X >> Y;
  min = (((min) < (A * X + B * Y)) ? (min) : (A * X + B * Y));
  min = (((min) < ((((X) > (Y)) ? (X) : (Y)) * C))
             ? (min)
             : ((((X) > (Y)) ? (X) : (Y)) * C));
  if (X > Y) {
    min = (((min) < (Y * C + (X - Y) * A)) ? (min) : (Y * C + (X - Y) * A));
  } else {
    min = (((min) < (Y * C + (Y - X) * B)) ? (min) : (Y * C + (Y - X) * B));
  }
  printf("%lld", min);
  return 0;
  return 0;
}
