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