#include <bits/stdc++.h>
using namespace std;
using vl = vector<long long>;
using vs = vector<string>;
using vc = vector<char>;
using ll = long long;
using vvl = vector<vector<ll> >;
using vvc = vector<vector<char> >;
using vd = vector<double>;
bool is_prime(int x) {
  if (x <= 1) return false;
  for (int i = 2; i * i <= x; i++)
    if (x % i == 0) return false;
  return true;
}
int wa(ll x) {
  ll sum = 0;
  while (x != 0) {
    sum += x % 10;
    x /= 10;
  }
  return sum;
}
ll p = 0, q = 0, r = 0;
int main() {
  ll a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  if (a + b > 2 * c) {
    if (x > y) {
      p = c * y * 2 + a * (x - y);
    } else {
      p = c * x * 2 + a * (y - x);
    }
    x = max(x, y);
    q = c * x * 2;
    p = min(p, q);
  } else {
    p = a * x + b * y;
  }
  cout << p << endl;
}
