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