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

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



now = k

res = 1

while now < n:

    now += k-1

    res += 1



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

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



if (n + k - 1) // k == 1:

    print((1))

else:

    res = ((n - k) + (k - 2)) // (k - 1) + 1

    print(res)

n, k = list(map(int, input().split()))
a = list(map(int, input().split()))
now = k
res = 1
while now < n:
    now += k - 1
    res += 1
print(res)

n, k = list(map(int, input().split()))
a = list(map(int, input().split()))
if (n + k - 1) // k == 1:
    print((1))
else:
    res = ((n - k) + (k - 2)) // (k - 1) + 1
    print(res)

-now = k -res = 1 -while now < n: -    now += k - 1 -    res += 1 -print(res) +if (n + k - 1) // k == 1: +    print((1)) +else: +    res = ((n - k) + (k - 2)) // (k - 1) + 1 +    print(res)