program main
    implicit none
    integer(4):: k,n,i,cnt, mini
    integer(4),allocatable:: a(:)

    read*, n,k
    allocate(a(n))
    read*, a(:)
    mini = minval(a(1:k))
    i=k+1
    cnt=1
    do while(i <= n)
        if (minval(a(i:i+k)) == mini) then
            i=i+k
        else
            i=i+k-1
        end if
        cnt=cnt+1
    end do

    print*, cnt
end program main