import Control.Arrow
import Control.Monad
import Data.Bits
import qualified Data.ByteString.Char8 as BC
import Data.Char
import Data.List
import Data.Maybe

main :: IO ()
main = do
  [n, k] <- getInts
  _ <- getInts
  print $ (n + k - 3) `div` (k - 1)

getInts :: IO [Int]
getInts = unfoldr (BC.readInt . BC.dropWhile (== ' ')) <$> BC.getLine
