let rec read_int_list len =
	if len <= 0 then []
	else begin
		let n = read_int () in
		n :: read_int_list (len - 1)
	end

let solve max_passenger max_wait_time arrival_times =
	let rec loop bus_count passenger_count first_arrival_time times =
		match times with
		| [] -> bus_count
		| t :: ts ->
			if (passenger_count < max_passenger) && (t <= first_arrival_time + max_wait_time) then
				loop bus_count (passenger_count + 1) first_arrival_time ts
			else
				loop (bus_count + 1) 1 t ts
	in
	let t :: ts = List.sort compare arrival_times in
	loop 1 1 t ts

let () =
	let [n; c; k] =
		read_line ()
		|> Str.split (Str.regexp " ")
		|> List.map int_of_string
	in
	let t = read_int_list n in
	solve c k t
	|> print_int
	|> print_newline
