import sys
# from collections import deque
input = sys.stdin.readline
N, L = map(int, input().split())
leaks = sorted(list(map(int, input().split())))
ans = 0
while leaks:
start = leaks.pop(0)
for i in range(start, start+L):
if i in leaks:
leaks.remove(i)
ans += 1
print(ans)