#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  if (C < A && C < B) {
    cout << 2 * C * max(X, Y) << endl;
  } else if (2 * C < A + B) {
    if (X < Y) {
      cout << 2 * C * X + B * (Y - X) << endl;
    } else {
      cout << 2 * C * Y + A * (X - Y) << endl;
    }
  } else {
    cout << A * X + B * Y << endl;
  }
  return 0;
}
