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

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

sum_L = [0] * (N + 1)

for i in range(N):

	sum_L[i + 1] = sum_L[i] + L[i]

ans = len([j for j in sum_L if j <= X])

print(ans)

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

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

D = [0] * (N + 1)

for i in range(N):

	D[i + 1] = D[i] + L[i]

ans = len([j for j in D if j <= X])

print(ans)

N, X = list(map(int, input().split()))
(*L,) = list(map(int, input().split()))
sum_L = [0] * (N + 1)
for i in range(N):
    sum_L[i + 1] = sum_L[i] + L[i]
ans = len([j for j in sum_L if j <= X])
print(ans)

N, X = list(map(int, input().split()))
(*L,) = list(map(int, input().split()))
D = [0] * (N + 1)
for i in range(N):
    D[i + 1] = D[i] + L[i]
ans = len([j for j in D if j <= X])
print(ans)

-sum_L = [0] * (N + 1) +D = [0] * (N + 1) -    sum_L[i + 1] = sum_L[i] + L[i] -ans = len([j for j in sum_L if j <= X]) +    D[i + 1] = D[i] + L[i] +ans = len([j for j in D if j <= X])