N,X=map(int,input().split())
L=list(map(int,input().split()))
l=[0]
s=0
for i in range(N):
   s+=L[i]
   if  s>X:
       break
   l.append(s)
print(len(l)) 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 l=[0] l [0] 0 s=0 s 0 for i in range(N):
   s+=L[i]
   if  s>X:
       break
   l.append(s) i range(N) range N s+=L[i] s L[i] L i if  s>X:
       break
    s>X s X break l.append(s) l.append l append s print(len(l)) print len(l) len l X=map(int,input().split()) map(int,input().split()) X s+=L[i] L[i] s N,X=map(int,input().split()) map(int,input().split()) N s=0 0 s l=[0] [0] l L=list(map(int,input().split())) list(map(int,input().split())) L
N,X=map(int,input().split())
L=list(map(int,input().split()))
l=[0]
s=0
for i in range(N):
   s+=L[i]
   if  s>X:
       break
   l.append(s)
print(len(l))