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