N=io.read("n")
K=io.read("n")
A={}
for i=1,N do
  A[i]=io.read("n")
end
table.sort(A)
minnub=1
for i=2,N do
  if A[i]==A[i-1] then
    minnub=minnub+1
    else
    break
  end
end
res=0
if (N-minnub)%(K-1)==0 then
  res=(N-minnub)//(K-1)
  else
  res=(N-minnub)//(K-1)+1
end
print(res)