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