output_description: Print the minimum required number of buses.
  
  * * *
input_description: The input is given from Standard Input in the following format:
  
      
      
      N C K
      T_1
      T_2
      :
      T_N
attempt: # -*- coding: utf-8 -*-
  import sys
  import math
  import os
  import itertools
  import string
  import heapq
  import _collections
  from collections import Counter
  from collections import defaultdict
  from functools import lru_cache
  import bisect
  import re
  import queue
  
  
  class Scanner:
      @staticmethod
      def int():
          return int(sys.stdin.readline().rstrip())
  
      @staticmethod
      def string():
          return sys.stdin.readline().rstrip()
  
      @staticmethod
      def map_int():
          return [int(x) for x in Scanner.string().split()]
  
      @staticmethod
      def string_list(n):
          return [input() for i in range(n)]
  
      @staticmethod
      def int_list_list(n):
          return [Scanner.map_int() for i in range(n)]
  
      @staticmethod
      def int_cols_list(n):
          return [int(input()) for i in range(n)]
  
  
  class Math:
      @staticmethod
      def gcd(a, b):
          if b == 0:
              return a
          return Math.gcd(b, a % b)
  
      @staticmethod
      def lcm(a, b):
          return (a * b) // Math.gcd(a, b)
  
      @staticmethod
      def roundUp(a, b):
          return -(-a // b)
  
      @staticmethod
      def toUpperMultiple(a, x):
          return Math.roundUp(a, x) * x
  
      @staticmethod
      def toLowerMultiple(a, x):
          return (a // x) * x
  
      @staticmethod
      def nearPow2(n):
          if n <= 0:
              return 0
          if n & (n - 1) == 0:
              return n
          ret = 1
          while n > 0:
              ret <<= 1
              n >>= 1
          return ret
  
      @staticmethod
      def sign(n):
          if n == 0:
              return 0
          if n < 0:
              return -1
          return 1
  
      @staticmethod
      def isPrime(n):
          if n < 2:
              return False
          if n == 2:
              return True
          if n % 2 == 0:
              return False
          d = int(n**0.5) + 1
          for i in range(3, d + 1, 2):
              if n % i == 0:
                  return False
          return True
  
  
  class PriorityQueue:
      def __init__(self, l=[]):
          self.__q = l
          heapq.heapify(self.__q)
          return
  
      def push(self, n):
          heapq.heappush(self.__q, n)
          return
  
      def pop(self):
          return heapq.heappop(self.__q)
  
  
  MOD = int(1e09) + 7
  INF = int(1e15)
  
  
  def main():
      # sys.stdin = open("sample.txt")
      N, C, K = Scanner.map_int()
      T = Scanner.int_cols_list(N)
      T.sort()
      S = [x + K for x in T]
      ans = 0
      cnt = 0
      lim = 0
      for i in range(N):
          if cnt == 0:
              lim = T[i] + K
          elif lim < T[i]:
              ans += 1
              lim = T[i] + K
          cnt += 1
          if cnt == C:
              ans += 1
              cnt = 0
              lim = 0
      if lim > 0:
          ans += 1
      print(ans)
      return
  
  
  if __name__ == "__main__":
      main()
  
problem_description: Statement
  
  Every day, N passengers arrive at Takahashi Airport. The i-th passenger
  arrives at time T_i.
  
  Every passenger arrived at Takahashi airport travels to the city by bus. Each
  bus can accommodate up to C passengers. Naturally, a passenger cannot take a
  bus that departs earlier than the airplane arrives at the airport. Also, a
  passenger will get angry if he/she is still unable to take a bus K units of
  time after the arrival of the airplane. For that reason, it is necessary to
  arrange buses so that the i-th passenger can take a bus departing at time
  between T_i and T_i + K (inclusive).
  
  When setting the departure times for buses under this condition, find the
  minimum required number of buses. Here, the departure time for each bus does
  not need to be an integer, and there may be multiple buses that depart at the
  same time.
samples: [{"input": "5 3 5\n    1\n    2\n    3\n    6\n    12", "output": "3\n    \n\nFor example, the following three buses are enough:\n\n  * A bus departing at time 4.5, that carries the passengers arriving at time 2 and 3.\n  * A bus departing at time 6, that carries the passengers arriving at time 1 and 6.\n  * A bus departing at time 12, that carries the passenger arriving at time 12.\n\n* * *"}, {"input": "6 3 3\n    7\n    6\n    2\n    8\n    10\n    6", "output": "3"}]