#include <bits/stdc++.h>
int a, b, c, x, y;
void search(int i, int *no, int *min) {
  if (i == 3) {
    int tmp = no[0] * 2 * c + no[1] * a + no[2] * b;
    if (*min > tmp) {
      *min = tmp;
    }
  } else if (i == 0) {
    if (x > y) {
      for (int j = 0; j <= x; j++) {
        no[i] = j;
        search(i + 1, no, min);
      }
    } else {
      for (int j = 0; j <= y; j = j + 2) {
        no[i] = j;
        search(i + 1, no, min);
      }
    }
  } else if (i == 1) {
    if (x < no[0]) {
      no[i] = 0;
    } else {
      no[i] = x - no[0];
    }
    search(i + 1, no, min);
  } else {
    if (y < no[0]) {
      no[i] = 0;
    } else {
      no[i] = y - no[0];
    }
    search(i + 1, no, min);
  }
}
int main() {
  int noPizza[3], minPrice = 2000000000;
  scanf("%d %d %d %d %d", &a, &b, &c, &x, &y);
  search(0, noPizza, &minPrice);
  printf("%d", minPrice);
  return 0;
}
