from collections import Counter

from math import *

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

A = [int(x) for x in input().strip().split()]

A.sort()

c = Counter(A)

minc = c[A[0]]

res = len(A) - minc

print((ceil(res/(K-1))))
from math import *

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

print((ceil((N-1)/(K-1))))
from collections import Counter
from math import *

N, K = [int(x) for x in input().strip().split()]
A = [int(x) for x in input().strip().split()]
A.sort()
c = Counter(A)
minc = c[A[0]]
res = len(A) - minc
print((ceil(res / (K - 1))))

from math import *

N, K = [int(x) for x in input().strip().split()]
print((ceil((N - 1) / (K - 1))))

-from collections import Counter -A = [int(x) for x in input().strip().split()] -A.sort() -c = Counter(A) -minc = c[A[0]] -res = len(A) - minc -print((ceil(res / (K - 1)))) +print((ceil((N - 1) / (K - 1))))