#include <bits/stdc++.h>
int main() {
  int A, B;
  int C, X, Y;
  scanf("%d %d %d %d %d", &A, &B, &C, &X, &Y);
  if ((A + B) / 2 < C)
    printf("%d\n", A * X + B * Y);
  else if ((A + B) / 2 > C && X > Y)
    printf("%d\n", 2 * C * Y + A);
  else if ((A + B) / 2 > C && X < Y)
    printf("%d\n", 2 * C * Y);
  return 0;
}
