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