open Scanf
open Printf

let id a = a
let pair a b = a, b
let triplet a b c = a, b, c

let rec scan_list = function
  | 1 -> scanf "%d" (fun k -> [k])
  | n -> scanf "%d " (fun k -> k :: scan_list (n-1))

let f n k = let a = 1 + int_of_float (ceil ((n -. k)/.(k -. 1.)))
  in printf "%d\n" a

let () = scanf "%f %f\n" f