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