import heapq as hq N, A, B, X, Y = map(int, input().split()) H = list(map(int, input().split())) def solve(k): task = [min(k-h, 0) for h in H] task.sort() S = -sum(task) for _ in range(A): v = -hq.heappop(task) if v >= X: S -= X v -= X else: S -= v v = 0 hq.heappush(task, -v) return S <= B*Y ng, ok = -1, 10**9 while ok-ng > 1: m = (ng+ok)//2 if solve(m): ok = m else: ng = m print(ok)