#include <bits/stdc++.h>
using ll = long long;
using namespace std;
int main() {
  ll a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  if (c * 2 <= min(a, b)) {
    return 0;
  }
  ll d = a * x + b * y;
  ll mn = min(x, y);
  ll e = mn * 2 * c;
  if (x > y)
    e += min(a, c) * (x - mn);
  else
    e += min(b, c) * (y - mn);
  cout << min(d, e) << endl;
}
