N,A,B,X,Y=map(int,input().split()) H=list(map(int,input().split())) L,R=0,10**9 from heapq import * def f(m): Q=[] heapify(Q) for i in range(N): heappush(Q,-max(0,H[i]-m)) for i in range(A): x=heappop(Q) x=-x heappush(Q,-max(0,x-X)) s=0 while len(Q): s-=heappop(Q) if s<=B*Y: return 1 else: return 0 while L>1 if f(M): R=M else: L=max(L+1,M) print(L)