main = do
    [n,k] <- ((fmap read . words) <$> getLine) :: IO [Int]
    _ <- getLine
    if n`mod`(k-1)==0
        then print $ n `div` (k-1)
        else print $ ceiling $ fromIntegral n/fromIntegral (k-1)
