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