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