#53628: ??????????????


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

學校 : 不指定學校
編號 : 256792
來源 : [123.195.40.217]
最後登入時間 :
2025-09-27 17:13:38

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))