def main(): from heapq import heapify,heappush,heappop n,A,b,x,y = map(int,input().split()) H = list(map(int,input().split())) ng,ok = -1,1000000000 while ok-ng > 1: mid = (ok+ng)>>1 a = A h = list(map(lambda x: (x-mid)*-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) if s <= y*b: ok = mid else: ng = mid print(ok) main()