N, X = list(map(int, input().split()))

L = list(map(int, input().split()))

cnt = 1

di = 0



for li in L:

    di += li

    if di > X:

        break

    cnt += 1



print(cnt)
n, x = list(map(int, input().split()))

L = list(map(int, input().split()))



point = 0

ans = 1



for l in L:

    point += l

    if point > x:

        break

    ans += 1



print(ans)

N, X = list(map(int, input().split()))
L = list(map(int, input().split()))
cnt = 1
di = 0
for li in L:
    di += li
    if di > X:
        break
    cnt += 1
print(cnt)

n, x = list(map(int, input().split()))
L = list(map(int, input().split()))
point = 0
ans = 1
for l in L:
    point += l
    if point > x:
        break
    ans += 1
print(ans)

-N, X = list(map(int, input().split())) +n, x = list(map(int, input().split())) -cnt = 1 -di = 0 -for li in L: -    di += li -    if di > X: +point = 0 +ans = 1 +for l in L: +    point += l +    if point > x: -    cnt += 1 -print(cnt) +    ans += 1 +print(ans)