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