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