#include <bits/stdc++.h>
int main(void) {
  int a, b, c, x, y, s, flog = -1;
  scanf("%d%d%d%d%d", &a, &b, &c, &x, &y);
  if ((a * 3 + b * 3) > c * 6)
    flog = 0;
  else
    flog = 1;
  if (flog == 0) {
    if (x > y)
      s = (x * 2) * c;
    else
      s = (y * 2) * c;
  } else
    s = (a * x) + (b * y);
  printf("%d\n", s);
  return 0;
}
