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()]



ans = 1

ans += (n - k) // (k - 1)

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

    ans += 1



print(ans)
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()]
ans = 1
ans += (n - k) // (k - 1)
if (n - k) % (k - 1) != 0:
    ans += 1
print(ans)

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