#include <bits/stdc++.h>
using namespace std;
static const long long INF = 1000000000000000000LL;
static const int MOD = 1000000007;
int main() {
  long long a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  long long res = INF;
  res = min(res, a * x + b * y);
  long long abmin = min(x, y);
  long long tmp;
  tmp = c * abmin;
  long long zan;
  if (x > y)
    zan = (x - y) * a;
  else
    zan = (y - x) * b;
  res = min(res, tmp + zan);
  res = min(res, c * max(x, y));
  cout << res << endl;
  return 0;
}
