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