n,x=map(int,input().split())
l=list(map(int,input().split()))
a=0
i=0
ans=1
while a+l[i]<=x:
  ans+=1
  a=a+l[i]
  i+=1
  if i+1>n:
    break
print(ans) 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 a=0 a 0 i=0 i 0 ans=1 ans 1 while a+l[i]<=x:
  ans+=1
  a=a+l[i]
  i+=1
  if i+1>n:
    break a+l[i]<=x a+l[i] a l[i] l i x ans+=1 ans 1 a=a+l[i] a a+l[i] a l[i] l i i+=1 i 1 if i+1>n:
    break i+1>n i+1 i 1 n break print(ans) print ans n,x=map(int,input().split()) map(int,input().split()) n l=list(map(int,input().split())) list(map(int,input().split())) l i+=1 1 i i=0 0 i ans+=1 1 ans x=map(int,input().split()) map(int,input().split()) x a=0 0 a ans=1 1 ans a=a+l[i] a+l[i] a
n,x=map(int,input().split())
l=list(map(int,input().split()))
a=0
i=0
ans=1
while a+l[i]<=x:
  ans+=1
  a=a+l[i]
  i+=1
  if i+1>n:
    break
print(ans)