import bisect



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

L = [int(i) for i in input().split()]



D = [0] * (N + 1)



for i in range(N):

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

    

print((bisect.bisect_right(D, X)))
n, x = list(map(int, input().split()))

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



ans = 1

d = 0

for l in L:

    d = d + l

    if d <= x:

        ans += 1

    else:

        break

        

print(ans)
import bisect

N, X = list(map(int, input().split()))
L = [int(i) for i in input().split()]
D = [0] * (N + 1)
for i in range(N):
    D[i + 1] = D[i] + L[i]
print((bisect.bisect_right(D, X)))

n, x = list(map(int, input().split()))
L = list(map(int, input().split()))
ans = 1
d = 0
for l in L:
    d = d + l
    if d <= x:
        ans += 1
    else:
        break
print(ans)

-import bisect - -N, X = list(map(int, input().split())) -L = [int(i) for i in input().split()] -D = [0] * (N + 1) -for i in range(N): -    D[i + 1] = D[i] + L[i] -print((bisect.bisect_right(D, X))) +n, x = list(map(int, input().split())) +L = list(map(int, input().split())) +ans = 1 +d = 0 +for l in L: +    d = d + l +    if d <= x: +        ans += 1 +    else: +        break +print(ans)