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

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



bound = [0]

for i in range(n):

    bound.append(bound[i] + l[i])



ans = 0

for j in range(n+1):

    if bound[j] <= x:

        ans += 1

print(ans)

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

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



d = [0] * (n+1)

ans = 1

for i in range(1, n+1):

    d[i] = d[i-1] + l[i-1]

    if d[i] <= x:

        ans += 1



print(ans)

n, x = list(map(int, input().split()))
l = list(map(int, input().split()))
bound = [0]
for i in range(n):
    bound.append(bound[i] + l[i])
ans = 0
for j in range(n + 1):
    if bound[j] <= x:
        ans += 1
print(ans)

n, x = list(map(int, input().split()))
l = list(map(int, input().split()))
d = [0] * (n + 1)
ans = 1
for i in range(1, n + 1):
    d[i] = d[i - 1] + l[i - 1]
    if d[i] <= x:
        ans += 1
print(ans)

-bound = [0] -for i in range(n): -    bound.append(bound[i] + l[i]) -ans = 0 -for j in range(n + 1): -    if bound[j] <= x: +d = [0] * (n + 1) +ans = 1 +for i in range(1, n + 1): +    d[i] = d[i - 1] + l[i - 1] +    if d[i] <= x: