program main
  implicit none

  integer :: n,x,i, a(100), b=1, p=0

  read(*,*)n,x
  read(*,*)(a(i), i = 1, n)
  
  do i = 1, n
    p = p + a(i)
    if (p <= x) then
      b = b + 1
    else
      write(*,*)b
      stop
    end if
  end do

  write(*,*)b

end program main