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