import sys input = sys.stdin.readline from collections import * def judge(k): l = [] S = 0 a = A decr = 0 for Hi in H: Hi = max(0, Hi-k) S += Hi if a>Hi//X: decr += X*(Hi//X) a -= Hi//X else: decr += X*a a = 0 l.append((Hi%X, 1)) l.sort(reverse=True) for v, c in l: if a>c: decr += v*c a -= c else: decr += v*a break return S-decr<=B*Y def binary_search(): l, r = 0, 10**10 while l<=r: m = (l+r)//2 if judge(m): r = m-1 else: l = m+1 return l N, A, B, X, Y = map(int, input().split()) H = list(map(int, input().split())) print(binary_search())