#include <bits/stdc++.h>
int total = 0;
int a, b, c = 0;
int x, y = 0;
int total1, total2, total3 = 0;
void case1(int a, int b, int x, int y) { total1 = a * x + b * y; }
void case2(int a, int b, int c, int x, int y) {
  if (x == y) {
    total2 = a * 2;
  } else if (x < y) {
    total2 = c * y * 2;
  } else if (x > y) {
    total2 = c * x * 2;
  }
}
void case3(int a, int b, int c, int x, int y) {
  if (x == y) {
    total3 = a * 2;
  } else if (x < y) {
    total3 = c * x * 2 + (y - x) * b;
  } else if (x > y) {
    total3 = c * y * 2 + (x - y) * a;
  }
}
void compare(int total1, int total2, int total3) {
  total = total1;
  if (total2 < total1) total = total2;
  if (total3 < total) total = total3;
}
int main(void) {
  int pizza[4];
  scanf("%d %d %d %d %d", &pizza[0], &pizza[1], &pizza[2], &pizza[3],
        &pizza[4]);
  if (1 <= pizza[0] && 1 <= pizza[1] && 1 <= pizza[2] && pizza[0] <= 5000 &&
      pizza[1] <= 5000 && pizza[2] <= 5000 && 1 <= pizza[3] && 1 <= pizza[4] &&
      pizza[3] <= 10 ^ 5 && pizza[4] <= 10 ^ 5) {
  } else {
    exit(1);
  }
  a = pizza[0];
  b = pizza[1];
  c = pizza[2];
  x = pizza[3];
  y = pizza[4];
  case1(a, b, x, y);
  case2(a, b, c, x, y);
  case3(a, b, c, x, y);
  compare(total1, total2, total3);
  printf("%d\n", total);
  return 0;
}
