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