import heapq
N,A,B,X,Y = map(int,input().split())
lsH0 = list(map(int,input().split()))

def is_ok(arg):
    lsH = [-(lsH0[i]-arg) for i in range(N)]
    heapq.heapify(lsH)
    for i in range(A):
        hp = heapq.heappop(lsH)
        v = hp + X
        heapq.heappush(lsH, v)

    vsum = 0
    for j in lsH:
        if j >= 0:
            continue
        else:
            vsum -= j

    if vsum > B*Y:
        return False
    else:
        return True
 
 
def meguru_bisect(ng, ok):
    while (abs(ok - ng) > 1):
        mid = (ok + ng) // 2
        if is_ok(mid):
            ok = mid
        else:
            ng = mid
    return ok
print(meguru_bisect(0,10**18+1))