import Data.List
import Data.Ratio

main = do
  (n:k:_) <- getLine >>= return . map read . words :: IO [Int]
  as <- getLine >>= return . map read . words :: IO [Int]

  print $ ceiling $ (n-1) % (k-1)
  
