n,k=[int(i) for i in input().split()]

a=[int(i) for i in input().split()]

print((-((-n+1)//(k-1))))
n,k=[int(i) for i in input().split()]

print((-((-n+1)//(k-1))))
n, k = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
print((-((-n + 1) // (k - 1))))

n, k = [int(i) for i in input().split()]
print((-((-n + 1) // (k - 1))))

-a = [int(i) for i in input().split()]