(* O(n log n) *)
let n, c, k = Scanf.scanf " %d %d %d" @@ fun a b c -> a, b, c
let ts = Array.init n @@ fun _ -> Scanf.scanf " %d" @@ (+) 0
let rec loop acc i r m =
  if i >= n then acc
  else if m >= c || r <= ts.(i) then loop (acc + 1) (i + 1) (ts.(i) + k) 1
  else loop acc (i + 1) r (m + 1)
let _ =
  Array.sort (-) ts;
  loop 1 1 (ts.(0) + k) 1 |> Printf.printf "%d\n"