program main
  implicit none
  integer N,X,L(100),D,i
  read(*, *) N, X
  read(*, *) (L(i), i = 1,N)
  D = 0
  do i = 1,N
    D = D+L(i)
    if (D>X) then
      write(*, *) i
      exit
    else if(i == N) then
      write(*, *) N+1
      exit
    end if
  end do
end program main
