n, k = list(map(int, input().split()))

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



n -= k

count = 1

while n > 0:

    n -= k - 1

    count += 1

    

print(count)
n, k = list(map(int, input().split()))

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



count = 1

n -= k

count += n // (k - 1)

if n % (k - 1) != 0:

    count += 1

    

print(count)
n, k = list(map(int, input().split()))
A = [int(i) for i in input().split()]
n -= k
count = 1
while n > 0:
    n -= k - 1
    count += 1
print(count)

n, k = list(map(int, input().split()))
A = [int(i) for i in input().split()]
count = 1
n -= k
count += n // (k - 1)
if n % (k - 1) != 0:
    count += 1
print(count)

+count = 1 -count = 1 -while n > 0: -    n -= k - 1 +count += n // (k - 1) +if n % (k - 1) != 0: