n,c,k=list(map(int,input().split()))

t=[int(eval(input())) for i in range(n)]

t.sort()

ans=0

x=t[0]

y=0

for i in range(n-1):

    y+=1

    if t[i]-x>k:

        ans+=1

        x=t[i]

        y=1

    elif y==c:

        ans+=1

        x=t[i+1]

        y=0

print((ans+2 if t[-1]-x>k else ans+1))
n,c,k=list(map(int,input().split()))

t=[int(eval(input())) for i in range(n)]

t.sort()

ans=1

x=t[0]

y=0

for i in range(n-1):

    y+=1

    if t[i]-x>k:

        ans+=1

        x=t[i]

        y=1

    elif y==c:

        ans+=1

        x=t[i+1]

        y=0

print((ans+1 if t[-1]-x>k else ans))
n, c, k = list(map(int, input().split()))
t = [int(eval(input())) for i in range(n)]
t.sort()
ans = 0
x = t[0]
y = 0
for i in range(n - 1):
    y += 1
    if t[i] - x > k:
        ans += 1
        x = t[i]
        y = 1
    elif y == c:
        ans += 1
        x = t[i + 1]
        y = 0
print((ans + 2 if t[-1] - x > k else ans + 1))

n, c, k = list(map(int, input().split()))
t = [int(eval(input())) for i in range(n)]
t.sort()
ans = 1
x = t[0]
y = 0
for i in range(n - 1):
    y += 1
    if t[i] - x > k:
        ans += 1
        x = t[i]
        y = 1
    elif y == c:
        ans += 1
        x = t[i + 1]
        y = 0
print((ans + 1 if t[-1] - x > k else ans))

-ans = 0 +ans = 1 -print((ans + 2 if t[-1] - x > k else ans + 1)) +print((ans + 1 if t[-1] - x > k else ans))