# AGC011A - Airport Bus

import sys

input = sys.stdin.readline



def main():

    N, C, K = tuple(map(int, input().rstrip().split()))

    T = sorted(map(int, [input().rstrip() for _ in range(N)]))

    ans, cur, cnt = 0, T[0] + K, 0

    for i in T:

        if i > cur or cnt == C:  # need a new bus

            cur = i + K

            cnt = 1

            ans += 1

        else:  # ride on the current bus

            cnt += 1

    print((ans + 1))





if __name__ == "__main__":

    main()
# AGC011A - Airport Bus

def main():

    N, C, K, *T = list(map(int, open(0).read().split()))

    T.sort()

    ans, cur, cnt = 0, T[0] + K, 0

    for i in T:

        if i > cur or cnt == C:  # need a new bus

            cur = i + K

            cnt = 1

            ans += 1

        else:  # ride on the current one

            cnt += 1

    print((ans + 1))





if __name__ == "__main__":

    main()
# AGC011A - Airport Bus
import sys

input = sys.stdin.readline


def main():
    N, C, K = tuple(map(int, input().rstrip().split()))
    T = sorted(map(int, [input().rstrip() for _ in range(N)]))
    ans, cur, cnt = 0, T[0] + K, 0
    for i in T:
        if i > cur or cnt == C:  # need a new bus
            cur = i + K
            cnt = 1
            ans += 1
        else:  # ride on the current bus
            cnt += 1
    print((ans + 1))


if __name__ == "__main__":
    main()

# AGC011A - Airport Bus
def main():
    N, C, K, *T = list(map(int, open(0).read().split()))
    T.sort()
    ans, cur, cnt = 0, T[0] + K, 0
    for i in T:
        if i > cur or cnt == C:  # need a new bus
            cur = i + K
            cnt = 1
            ans += 1
        else:  # ride on the current one
            cnt += 1
    print((ans + 1))


if __name__ == "__main__":
    main()

-import sys - -input = sys.stdin.readline - - -    N, C, K = tuple(map(int, input().rstrip().split())) -    T = sorted(map(int, [input().rstrip() for _ in range(N)])) +    N, C, K, *T = list(map(int, open(0).read().split())) +    T.sort() -        else:  # ride on the current bus +        else:  # ride on the current one