# AtCoder Beginner Contest 101

# C - Minimization



N, K = [int(i) for i in input().split()]

A = input().split()

print((-(-(N-1) // (K-1))))
# AtCoder Beginner Contest 101

# C - Minimization



N, K = [int(i) for i in input().split()]

# A = input().split()

print((-(-(N-1) // (K-1))))
# AtCoder Beginner Contest 101
# C - Minimization
N, K = [int(i) for i in input().split()]
A = input().split()
print((-(-(N - 1) // (K - 1))))

# AtCoder Beginner Contest 101
# C - Minimization
N, K = [int(i) for i in input().split()]
# A = input().split()
print((-(-(N - 1) // (K - 1))))

-A = input().split() +# A = input().split()