let () =
  let n, c, k = Scanf.scanf "%d %d %d\n" (fun n c k -> n, c, k) in
  let ts = Array.init n (fun _ -> Scanf.scanf "%d " (fun n -> n)) in
  Array.sort compare ts;
  Array.fold_left (fun (acc, i, j) t ->
    if ts.(i) + k < t then (acc + 1, j, j + 1)
    else if c <= j - i then (acc + 1, i + c, j + 1)
    else (acc, i, j + 1)) (0, 0, 0) ts
  |> (fun (acc, _, _) -> Printf.printf "%d\n" (1 + acc))