#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using Graph = vector<vi>;
using vb = vector<bool>;
using boolGraph = vector<vb>;
using P = pair<int, int>;
const int MOD = 1e9 + 7;
const double EPS = 1e-9;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int ans = a * x + b * y;
  int tmp;
  if (x < y)
    tmp = max(c * x * 2 + b * (y - x), c * y * 2);
  else
    tmp = max(c * y * 2 + a * (x - y), c * x * 2);
  ans = max(ans, tmp);
  cout << ans << endl;
  return 0;
}
