from heapq import heapify,heappush,heappop n,A,b,x,y = map(int,input().split()) H = list(map(int,input().split())) def solve(k): a = A h = list(map(lambda x: (x-k)*-1,H)) heapify(h) while a: v = heappop(h)*-1 if v <= 0: break heappush(h,(v-x)*-1) a -= 1 s = 0 while h: s += max(0, heappop(h)*-1) return s <= y*b ng,ok = -1,1234567890 while ok-ng > 1: mid = (ok+ng)//2 if solve(mid): ok = mid else: ng = mid print(ok)