import heapq n,a,b,x,y=map(int,input().split()) h=list(map(int,input().split())) def check(k): c=[] for i in range(n): c.append(min(0,k-h[i])) heapq.heapify(c) for i in range(a): target=heapq.heappop(c) target=min(0,x+target) heapq.heappush(c,target) if (-1)*sum(c)<=b*y: return True else: return False ub=10**9 lb=-1 while ub-lb>1: mid=(ub+lb)//2 if check(mid): ub=mid else: lb=mid print(ub)