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