def main():
  n,x = list(map(int,input().split()))
  l = list(map(int,input().split()))
  bound=0
  ans=1
  for i in range(0,n):
    bound+=l[i]
    if bound <=x:
      ans+=1
  print(ans)

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

main()