#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using VI = vector<ll>;
static const ll kIntMax = numeric_limits<ll>::infinity();
static const double kFloatMax = numeric_limits<double>::infinity();
vector<ll> vi;
int main() {
  ll a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  ll price = 0, tmp;
  price = 1000000000;
  for (ll i = 0; i < (100000); i++) {
    tmp = i * c * 2 + max(0ll, x - i) * a + max(0ll, y - i) * b;
    if (tmp < price) price = tmp;
    if (i > x && i > y) break;
  }
  cout << price << endl;
  return 0;
}
