import sys

import numpy as np



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



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



x = np.zeros(N+1)



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

    x[n] = x[n-1] + L[n-1]

    if x[n] > X:

        print(n)

        sys.exit()



print((N+1))



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

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



cnt = 1

sum_L = 0

for l in L:

    sum_L += l

    if sum_L <= X:

        cnt += 1

    else:

        break



print(cnt)

import sys
import numpy as np

N, X = list(map(int, input().split()))
L = np.array(list(map(int, input().split())))
x = np.zeros(N + 1)
for n in range(1, N + 1):
    x[n] = x[n - 1] + L[n - 1]
    if x[n] > X:
        print(n)
        sys.exit()
print((N + 1))

N, X = list(map(int, input().split()))
L = list(map(int, input().split()))
cnt = 1
sum_L = 0
for l in L:
    sum_L += l
    if sum_L <= X:
        cnt += 1
    else:
        break
print(cnt)

-import sys -import numpy as np - -L = np.array(list(map(int, input().split()))) -x = np.zeros(N + 1) -for n in range(1, N + 1): -    x[n] = x[n - 1] + L[n - 1] -    if x[n] > X: -        print(n) -        sys.exit() -print((N + 1)) +L = list(map(int, input().split())) +cnt = 1 +sum_L = 0 +for l in L: +    sum_L += l +    if sum_L <= X: +        cnt += 1 +    else: +        break +print(cnt)