import bisect

N,X=map(int,input().split())
L=list(map(int,input().split()))
sumL=[0]
for i in range(N):
    sumL.append(sumL[i]+L[i])
print(bisect.bisect_right(sumL,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 sumL=[0] sumL [0] 0 for i in range(N):
    sumL.append(sumL[i]+L[i]) i range(N) range N sumL.append(sumL[i]+L[i]) sumL.append sumL append sumL[i]+L[i] sumL[i] sumL i L[i] L i print(bisect.bisect_right(sumL,X)) print bisect.bisect_right(sumL,X) bisect.bisect_right bisect bisect_right sumL X L=list(map(int,input().split())) list(map(int,input().split())) L N,X=map(int,input().split()) map(int,input().split()) N X=map(int,input().split()) map(int,input().split()) X sumL=[0] [0] sumL
import bisect

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