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

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



ans = 1

d = 0



for i in range(len(L)) :

    d += L[i]

    if d <= X :

        ans += 1

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

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



ans = 1

d = 0



for i in range(N) :

    d += L[i]

    if d > X :

        break

    

    ans += 1



print(ans)

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

N, X = list(map(int, input().split()))
L = list(map(int, input().split()))
ans = 1
d = 0
for i in range(N):
    d += L[i]
    if d > X:
        break
    ans += 1
print(ans)

-for i in range(len(L)): +for i in range(N): -    if d <= X: -        ans += 1 +    if d > X: +        break +    ans += 1