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