#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int sum = 0;
  if (X > Y && X % 2 == 1) {
    int sum1 = A * X + B * Y;
    int sum2 = C * 2 * X;
    int sum3 = C * 2 * (X - 1) + min(A, C * 2);
    sum = min(sum1, sum2);
    sum = min(sum, sum3);
  } else if (X < Y && Y % 2 == 1) {
    int sum1 = A * X + B * Y;
    int sum2 = C * 2 * Y;
    int sum3 = C * 2 * (Y - 1 + (min(C, B / 2)));
    sum = min(sum1, sum2);
    sum = min(sum, sum3);
  } else {
    int sum1 = A * X + B * Y;
    int sum2 = C * 2 * (max(X, Y));
    sum = min(sum1, sum2);
  }
  cout << sum << endl;
  return 0;
}
