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