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

a = list(map(int, input().split()))

count = 0



while n > k:

    n -= k - 1

    count += 1



count += 1

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

_ = eval(input())

count = 0



while n > k:

    n -= k - 1

    count += 1



count += 1

print(count)
(n, k) = list(map(int, input().split()))
a = list(map(int, input().split()))
count = 0
while n > k:
    n -= k - 1
    count += 1
count += 1
print(count)

(n, k) = list(map(int, input().split()))
_ = eval(input())
count = 0
while n > k:
    n -= k - 1
    count += 1
count += 1
print(count)

-a = list(map(int, input().split())) +_ = eval(input())