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: from copy import *
  from sys import *
  import math
  import queue
  from collections import defaultdict, Counter, deque
  from fractions import Fraction as frac
  
  setrecursionlimit(1000000)
  
  
  # s[i] is linked with t[len(s)-i-1]
  def main():
      n, c, k = map(int, input().split())
      t = [int(input()) for i in range(n)]
      t.sort()
      print(t)
      ans = 1
      count = 1
      first = t[0]
      for i in t[1:]:
          if count > c or first + k <= i:
              ans += 1
              count = 1
              first = i
          else:
              count += 1
      print(ans)
  
  
  def zip(a):
      mae = a[0]
      ziparray = [mae]
      for i in range(1, len(a)):
          if mae != a[i]:
              ziparray.append(a[i])
              mae = a[i]
      return ziparray
  
  
  def is_prime(n):
      if n < 2:
          return False
  
      for k in range(2, int(math.sqrt(n)) + 1):
          if n % k == 0:
              return False
  
      return True
  
  
  def list_replace(n, f, t):
      return [t if i == f else i for i in n]
  
  
  def base_10_to_n(X, n):
      X_dumy = X
      out = ""
      while X_dumy > 0:
          out = str(X_dumy % n) + out
          X_dumy = int(X_dumy / n)
      if out == "":
          return "0"
      return out
  
  
  def gcd(m, n):
      x = max(m, n)
      y = min(m, n)
      while x % y != 0:
          z = x % y
          x = y
          y = z
      return y
  
  
  class Queue:
      def __init__(self):
          self.q = deque([])
  
      def push(self, i):
          self.q.append(i)
  
      def pop(self):
          return self.q.popleft()
  
      def size(self):
          return len(self.q)
  
      def debug(self):
          return self.q
  
  
  class Stack:
      def __init__(self):
          self.q = []
  
      def push(self, i):
          self.q.append(i)
  
      def pop(self):
          return self.q.pop()
  
      def size(self):
          return len(self.q)
  
      def debug(self):
          return self.q
  
  
  class graph:
      def __init__(self):
          self.graph = defaultdict(list)
  
      def addnode(self, l):
          f, t = l[0], l[1]
          self.graph[f].append(t)
          self.graph[t].append(f)
  
      def rmnode(self, l):
          f, t = l[0], l[1]
          self.graph[f].remove(t)
          self.graph[t].remove(f)
  
      def linked(self, f):
          return self.graph[f]
  
  
  class dgraph:
      def __init__(self):
          self.graph = defaultdict(set)
  
      def addnode(self, l):
          f, t = l[0], l[1]
          self.graph[f].append(t)
  
      def rmnode(self, l):
          f, t = l[0], l[1]
          self.graph[f].remove(t)
  
      def linked(self, f):
          return self.graph[f]
  
  
  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"}]