def bsearch(low: int, high: int, fun, is_complement=False) -> int: def pred(x: int) -> bool: return not fun(x) if is_complement else fun(x) lo = low hi = high res = low while lo <= hi: m = (lo + hi) // 2 if pred(m): res = max(res, m) lo = m + 1 else: hi = m - 1 return res + 1 if is_complement else res def can(m: int) -> bool: hs = sorted([(h-m, i) for i, h in enumerate(H)], reverse=True) xs = H[:] na = A for h, i in hs: if na == 0: xs[i] = h elif h > 0: d = h // X xs[i] = h - X * min(na, d) na -= min(na, d) else: xs[i] = 0 xs = sorted([x for x in xs if x > 0]) while na > 0 and xs: if xs[-1] <= X: xs.pop() na -= 1 elif xs[-1] > X: xs[-1] -= X na -= 1 return sum(xs) <= Y * B N, A, B, X, Y = map(int, input().split()) H = list(map(int, input().split())) ans = bsearch(0, 10**9, can, is_complement=True) print(ans)