program bounding
implicit none
integer n, x, i, res, d
integer,allocatable,dimension(:) :: l
read*, n, x
allocate(l(n))
read*, l
res=1
d=0
do i=1, n
 d=d+l(i)
 if(d.le.x) then
 res=res+1
 else if(d.gt.x) then
 else
 end if
end do
print*, res
end program