#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) > 2 * c) {
    if (x > y) {
      long int d = 2 * c * y;
      long int e = a * (x - y);
      if ((d + e) > 2 * c * x)
        cout << 2 * c * x << endl;
      else
        cout << d + e << endl;
    } else {
      long int d = 2 * c * x;
      long int e = a * (y - x);
      if ((d + e) > 2 * c * y)
        cout << 2 * c * y << endl;
      else
        cout << d + e << endl;
    }
  } else
    cout << a * x + b * y << endl;
  return 0;
}
