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