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