let n, c, k = Scanf.scanf "%d %d %d" (fun n c k -> n, c, k)
let t = Array.init n (fun _ -> Scanf.scanf " %d" (fun i -> i))

let rec f i t' p b =
  if i = n then b
  else if t' < t.(i) || p = c then f (i + 1) (t.(i) + k) 1 (b + 1)
  else f (i + 1) t' (p + 1) b

let () =
  Array.sort (fun x y -> x - y) t;
  let ans = f 0 0 0 0 in
  Printf.printf "%d\n" ans
