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