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