program name
    use,intrinsic :: iso_fortran_env
    implicit none
    integer(int32):: n,k

    read*, n,k
    if (n==k)then
        print'(i0)', 1
    else
        print'(i0)', n/(k-1)
    end if
end program name