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