#include <bits/stdc++.h>
int main() {
  int a, b, c, A, B, C, X, Y;
  int min, price;
  scanf("%d %d %d %d %d", &A, &B, &C, &X, &Y);
  min = 1e9;
  for (c = 0; c < X + 1 || c < Y + 1; c += 2) {
    if (X - c / 2 >= 0)
      a = X - c / 2;
    else
      a = 0;
    if (Y - c / 2 >= 0)
      b = Y - c / 2;
    else
      b = 0;
    price = a * A + b * B + c * C;
    if (min > price) min = price;
  }
  printf("%d\n", min);
  return 0;
}
