import collections

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

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

B = collections.Counter(A)[min(A)]

print((-(-(N-B)//(K-1))))
N,K = list(map(int,input().split()))

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

print((-(-(N-1)//(K-1))))
import collections

N, K = list(map(int, input().split()))
A = list(map(int, input().split()))
B = collections.Counter(A)[min(A)]
print((-(-(N - B) // (K - 1))))

N, K = list(map(int, input().split()))
A = list(map(int, input().split()))
print((-(-(N - 1) // (K - 1))))

-import collections - -B = collections.Counter(A)[min(A)] -print((-(-(N - B) // (K - 1)))) +print((-(-(N - 1) // (K - 1))))