#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int ret = 5000 * 100000 + 1;
  ret = min(ret, a * x + b * y);
  ret = min(ret, max(x, y) * 2 * c);
  if (y - x > 0) ret = min(ret, 2 * c * x + b * (y - x));
  if (x - y > 0) ret = min(ret, a * (x - y) + 2 * c * y);
  cout << ret << endl;
  return 0;
}
