#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;
  if (a + b < c * 2)
    price = a * x + b * y;
  else {
    if (c * 2 <= a) {
      price += x * c * 2;
      y -= x;
      x = 0;
    }
    if (c * 2 <= b && y > 0) {
      price += y * c * 2;
      x -= y;
      y = 0;
    }
    x = max(0ll, x);
    y = max(0ll, y);
    ll z = ((ll)min(x, y) / 2) * 2;
    price += z * c * 2 + (x - z) * a + (y - z) * b;
  }
  cout << price << endl;
  return 0;
}
