import bisect
N,X = map(int,input().split())
L =list(map(int,input().split()))
cnt = 0
M = [0]
for i in range(N):
    cnt += L[i]
    M.append(cnt)

print(bisect.bisect_right(M,X)) import bisect bisect N,X = map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split X L =list(map(int,input().split())) L list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split cnt = 0 cnt 0 M = [0] M [0] 0 for i in range(N):
    cnt += L[i]
    M.append(cnt) i range(N) range N cnt += L[i] cnt L[i] L i M.append(cnt) M.append M append cnt print(bisect.bisect_right(M,X)) print bisect.bisect_right(M,X) bisect.bisect_right bisect bisect_right M X N,X = map(int,input().split()) map(int,input().split()) N X = map(int,input().split()) map(int,input().split()) X L =list(map(int,input().split())) list(map(int,input().split())) L cnt += L[i] L[i] cnt cnt = 0 0 cnt M = [0] [0] M
import bisect
N,X = map(int,input().split())
L =list(map(int,input().split()))
cnt = 0
M = [0]
for i in range(N):
    cnt += L[i]
    M.append(cnt)

print(bisect.bisect_right(M,X))