(* O(n) *)
let solve n k =
  let rec find acc i =
    if i + k - 1 > n then
      acc
    else
      find (acc + 1) (i + 1)
  in
    find 0 1

let read_ints () = read_line () |> Str.split (Str.regexp " ") |> List.map int_of_string

let _ =
  match read_ints () with
  | [n; k] -> solve n k |> string_of_int |> print_endline
  | _ -> ()