      integer :: n,l(100),x
      integer :: i,ans,d
      
      read*,n,x
      read*,l(1:n)
      
      d = 0
      ans = 0
      if( d<=x ) ans = ans + 1
      
      do i = 2,n+1
        d = d + l(i-1)
        if( d<=x ) ans = ans + 1
      end do
      
      print*,ans
      
      end program