program AGC011A
    implicit none
    integer(8)::N,C,K,ans,tl,i,pcount
    integer(8),allocatable,dimension(:)::T
    read(5,*)N,C,K
    allocate(T(N))
    read*,T
    T=iqsort(T)
    ans=0
    tl=T(1)+K
    pcount=0
    do i=2,N
        if(T(i)<=tl)then
            pcount=pcount+1
        else
            ans=ans+1
            pcount=0
            tl=T(i)+K
        end if
        if(pcount>=C)then
            pcount=0
            tl=T(i)+K
            ans=ans+1
        end if
    end do

    print'(i0)',ans+1
contains
    recursive function iqsort(ix) result(ires)
      integer(8), allocatable :: ires(:)
      integer(8), intent(in)  :: ix(:)
      integer :: k
      if (size(ix) <= 1) then 
        ires = ix
      else  
        k = ix(size(ix) / 2)
        ires = [iqsort(pack(ix, ix < k)), pack(ix, ix == k), iqsort(pack(ix, ix > k))] 
      end if
    end function iqsort
end program AGC011A