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