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