#include <bits/stdc++.h>
using namespace std;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
using V = vector<T>;
const int INF = 1e9;
const int MOD = 1000000007;
using Graph = vector<vector<int>>;
long long mul(long long l, long long r) {
  long long ret = 1;
  for (int i = 0; i < l - r + 1; ++i) {
    ret *= i + r;
    ret %= MOD;
  }
  return ret;
}
long long modPow(long long x, long long n) {
  if (n == 0) return 1;
  long long res = modPow(x * x % MOD, n / 2);
  if (n & 1) res = res * x % MOD;
  return res;
}
long long com(long long n, long long k) {
  long long ret1 = mul(n, n - k + 1);
  long long ret2 = mul(k, 1);
  long long ret3 = modPow(ret2, MOD - 2);
  return ret1 * ret3 % MOD;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int res = 0;
  if (min(min(a, b), c) == c) {
    res = min(max(x, y) * 2 * c, a * x + b * y);
  } else {
    if (x < y) {
      res = min(x * 2 * c + abs(x - y) * b, a * x + b * y);
    } else {
      res = min(y * 2 * c + abs(x - y) * a, a * x + b * y);
    }
  }
  cout << res << "\n";
}
