main = do
  str <- getLine
  let [n, k] = map read (words str) ::[Int]
  str <- getLine
  let listA = take n $ map read (words str) ::[Int]
  print $ 1 + if (n-k) == 0 then 0 else ceiling $ toRational (n-k) / toRational (k-1)
  