#include <bits/stdc++.h>
using namespace std;
const long long maxn = 2 * 1e5 + 1;
const long long mod = 1000000009;
const long double eps = 1e-9;
const long long inf = ((1ll << 31ll) - 1ll);
const long long INF = 10000000000000000ll;
const long double pi = acos(-1);
long long qpow(long long b, long long e) {
  if (!e) return 1;
  if (e & 1) return qpow(b, e - 1) * b;
  long long pwur = qpow(b, e >> 1);
  return pwur * pwur;
}
long long modinv(long long x) { return qpow(x, mod - 2); }
const long long pr = 10000;
map<long long, long long> isp;
void criba() {
  for (long long i = 0; i <= pr; i++) isp[i] = i;
  isp[0] = isp[1] = -1;
  for (long long i = 2; i * i <= pr; i++) {
    if (isp[i] == i) {
      for (long long j = i + i; j <= pr; j += i) isp[j] = i;
    }
  }
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.setf(ios::fixed);
  cout.precision(0);
  srand(time(NULL));
  long long a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  long long ans1 = 0, ans2 = a * x + b * y, ans3 = 2 * c * y;
  if (x < y) {
    swap(a, b);
    swap(x, y);
  }
  ans1 += 2 * c * y;
  x -= y;
  ans1 += a * x;
  cout << min({ans1, ans2, ans3}) << '\n';
  return 0;
}
