#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int Sum = 1000000000;
  for (int i = 0; i <= min(X, Y); i++) {
    int S = (X - i) * A + (Y - i) * B + i * 2 * C;
    Sum = min(S, Sum);
  }
  cout << Sum << endl;
}
