N, K = list(map(int, input().split()))

A = input().split()

count = 0

if N == K:

    print((1))

else:

    count += 1

    rem = N-K

    add = 1 if (N-K)%(K-1) else 0

    count += (N-K)//(K-1) + add

    print(count)
N, K = list(map(int, input().split()))

A = eval(input())

add = 1 if (N-1)%(K-1) else 0

print(((N-1)//(K-1) + add))
N, K = list(map(int, input().split()))
A = input().split()
count = 0
if N == K:
    print((1))
else:
    count += 1
    rem = N - K
    add = 1 if (N - K) % (K - 1) else 0
    count += (N - K) // (K - 1) + add
    print(count)

N, K = list(map(int, input().split()))
A = eval(input())
add = 1 if (N - 1) % (K - 1) else 0
print(((N - 1) // (K - 1) + add))

-A = input().split() -count = 0 -if N == K: -    print((1)) -else: -    count += 1 -    rem = N - K -    add = 1 if (N - K) % (K - 1) else 0 -    count += (N - K) // (K - 1) + add -    print(count) +A = eval(input()) +add = 1 if (N - 1) % (K - 1) else 0 +print(((N - 1) // (K - 1) + add))