#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;
  ll f = c * max(x, y) * 2;
  ll d = a * x + b * y;
  ll mn = min(x, y);
  ll e = mn * 2 * c;
  if (x > y) {
    if (a > c)
      e += c * (x - mn) * 2;
    else
      e += a * (x - mn);
  } else if (x < y) {
    if (b > c)
      e += c * (y - mn) * 2;
    else
      e += b * (y - mn);
  }
  cout << min(min(d, e), f) << endl;
}
