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

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

count = 1

d = 0



for i in range(n):

    d += l[i]

    if d <= x:

        count += 1

        

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

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



cnt = 1

z = 0



for i in range(n):

    z += l[i]

    if z <= x:

        cnt += 1

        

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

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

-count = 1 -d = 0 +cnt = 1 +z = 0 -    d += l[i] -    if d <= x: -        count += 1 -print(count) +    z += l[i] +    if z <= x: +        cnt += 1 +print(cnt)