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

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

L.insert(0,0)

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

cnt = 1

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

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

    if D[i]<=X:

        cnt += 1

    else:

        break

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

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

L.insert(0,0)

D = 0

cnt = N+1

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

    D += L[i]

    if D>X:

        cnt = i

        break

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

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

-D = [0 for _ in range(N + 2)] -cnt = 1 -for i in range(2, N + 2): -    D[i] = D[i - 1] + L[i - 1] -    if D[i] <= X: -        cnt += 1 -    else: +D = 0 +cnt = N + 1 +for i in range(1, N + 1): +    D += L[i] +    if D > X: +        cnt = i