let split_string ?(pattern="") = Str.split @@ Str.regexp pattern
let n, k = Scanf.sscanf (read_line ()) "%d %d" @@ fun n k -> (n - 1, k - 1)
let a = read_line () |> split_string ~pattern:" " |> List.map int_of_string

let () = Printf.printf "%d\n" @@ (n + k - 1)/ k