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