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