from heapq import heapify, heappop, heappush n, a, b, x, y = map(int, input().split()) H = list(map(int, input().split())) left = -1 right = 10**9 while right - left > 1: mid = (left + right) // 2 Hc = [0 for _ in range(n)] for i in range(n): Hc[i] = min(0, mid - H[i]) heapify(Hc) for i in range(a): curr = heappop(Hc) curr = min(0, curr + x) heappush(Hc, curr) if -sum(Hc) <= b * y: right = mid else: left = mid print(right)