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_passengers max_wait_time arrival_times =
	let remove_passengers start_time times =
		let rec loop passenger_count times =
			match times with
			| [] -> []
			| t :: ts ->
				if (passenger_count < max_passengers) && (t <= start_time + max_wait_time) then
					loop (passenger_count + 1) ts
				else
					t :: ts
		in
		loop 0 times
	in
	let rec count_buses acc times = 
		match times with
		| [] -> acc
		| t :: _ ->
			remove_passengers t times
			|> count_buses (acc + 1)
	in
	count_buses 0 (List.sort compare arrival_times)

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
