open Batteries
open Printf
let () =
  let n,k = Scanf.scanf "%d %d " (fun a b -> a,b) in
  let a_arr = Array.init n (fun _ -> Scanf.scanf "%d " (fun a -> a)) in

  Printf.printf "%d\n" @@ 
  (
  if (n-1) mod (k-1) = 0 then
    (n-1) / (k-1)
  else
    (n-1) / (k-1) +1
)
