#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
struct edge {
  ll to, cost;
};
int main(int argc, char const* argv[]) {
  ios::sync_with_stdio(false);
  cin.tie(0);
  ull A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  if (X < Y) swap(A, B), swap(X, Y);
  if (C * X * 2 < A * X + B * Y)
    cout << X * C * 2 << endl;
  else if (C * 2 < A + B)
    cout << Y * C * 2 + (X - Y) * A;
  else
    cout << A * X + B * Y << endl;
  return 0;
}
