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

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

D = 0

count = 1

for i in range(N):

    D = D + L[i]

    if D <= X:

        count += 1

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

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

ans = 1

a = 0

for i in range(n):

    a = a+l[i]

    if a <= x:

        ans +=1

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

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

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