#43738: ac python


twytsam@gmail.com (柚ゲすめふ)


n = int(input())
wo, wt, ho, ht = map(int, input().split())
wo = wo*wo
wt = wt*wt
fill = map(int, input().split())
best = 0
now = 0
for i in fill:
    if ho>0:
        if i<=wo*ho:
            now = i/wo
            ho = ho-now
        elif i-wo*ho<=wt*ht:
            now = i-wo*ho
            ht = ht-now/wt
            now = now/wt+ho
            ho = 0
        else:
            now = ho+ht
            break
    elif ht>0:
        if i<=wt*ht:
            now = i/wt
            ht = ht-now
        else:
            now = ht
            break
    if now>best:
        best = now
if now>best:
        best = now
print(int(best))

 

 

66666666啊!!!!!!!!!!!!!!!!!!!!!