program bounding

  implicit none
  integer::n,x,ans,d,i
  integer,allocatable::L(:)
  
  read*,n,x
  allocate(L(n))

  read*,L

  d=0
  ans=1
  do i=2,n+1
    d=d+L(i-1)
    if(d<=x) ans=ans+1
    if(d>x) exit
  end do

  print*,ans

end program bounding