program main
	implicit none
    integer::n,x,c,l,i
    integer, allocatable :: a(:)
    read*,n,x
    allocate(a(n))
    read(*, *)(a(i), i = 1,n)
    c=0
    l=0
    i=1
    do while(l<=x)
    l=l+a(i)
    i=i+1
    c=c+1
    end do
    
print*,c
end program main