import sys input = sys.stdin.readline import heapq N,A,B,X,Y=map(int,input().split()) H=list(map(int,input().split())) OK=max(H) NG=-1 while OK>NG+1: mid=(OK+NG)//2 Q=[] for h in H: h-=mid Q.append(min(0,-h)) heapq.heapify(Q) for i in range(A): x=-heapq.heappop(Q) x=max(0,x-X) heapq.heappush(Q,-x) S=-sum(Q) if S<=Y*B: OK=mid else: NG=mid print(OK)