import Control.Applicative
import Data.List

getInt :: IO Int
getInt = (\a -> read a :: Int) <$> getLine

getInteger :: IO Integer
getInteger = (\a -> read a :: Integer) <$> getLine

getListInt :: IO [Int]
getListInt = ((map (\a -> read a :: Int)) . words) <$> getLine

getListInteger :: IO [Integer]
getListInteger = ((map (\a -> read a :: Integer)) . words) <$> getLine

findOne :: [Integer] -> Integer
findOne [] = 0
findOne (1:res) = 1
findOne (_:res) = 1 + findOne res

main = do
    [n, k] <- getListInteger
    a <- getListInteger
    print $ div n (k - 1)
