from heapq import heapify, heappush, heappop n, a, b, x, y = map(int, input().split()) h = list(map(lambda x:-int(x), input().split())) heapify(h) for i in range(a): xx = -heappop(h) xx -= x heappush(h, -xx) h = list(map(lambda x:-x, h)) l, r = 0, 1000000000 while r - l > 1: m = (l + r) // 2 hh = list(map(lambda x:x-m, h)) t = b * y for i in range(n): d = max(0, min(hh[i], t)) hh[i] -= d t -= d for i in range(n): if hh[i] > 0: l = m break else: r = m print(r)