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

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

D = 0

i = 1

while i - 1 < N:

    #print("D, X", D, X)

    D += L[i-1]

    if X < D:

        break

    i += 1



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

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

D = [0 for _ in range(N+1)]

ans = 0

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

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

for j in range(0, N+1):

    if D[j] <= X:

        ans += 1

print(ans)
N, X = list(map(int, input().split()))
L = list(map(int, input().split()))
D = 0
i = 1
while i - 1 < N:
    # print("D, X", D, X)
    D += L[i - 1]
    if X < D:
        break
    i += 1
print(i)

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

-D = 0 -i = 1 -while i - 1 < N: -    # print("D, X", D, X) -    D += L[i - 1] -    if X < D: -        break -    i += 1 -print(i) +D = [0 for _ in range(N + 1)] +ans = 0 +for i in range(1, N + 1): +    D[i] = D[i - 1] + L[i - 1] +for j in range(0, N + 1): +    if D[j] <= X: +        ans += 1 +print(ans)