import heapq def is_ok(K): HH = [0]*N for i in range(N): HH[i]=H[i]-K y = Y*B j = 0 while y>0 and j0: HH[j]-=d y-=d j+=1 return max(HH)<=0 def meguru_bisect(ok, ng): while (abs(ok - ng) > 1): mid = (ok + ng) // 2 if is_ok(mid): ok = mid else: ng = mid return ok N,A,B,X,Y = map(int, input().split()) H = list(map(int, input().split())) HQ = [] for i in range(N): heapq.heappush(HQ,(-H[i],i)) for _ in range(A): hi,i = heapq.heappop(HQ) H[i]-=X heapq.heappush(HQ,(-H[i],i)) print(meguru_bisect(10**9 + 1,0))