https://www.acmicpc.net/problem/1449
import sys
input = sys.stdin.readline
n, l = map(int, input().split())
water = list(map(int, input().split()))
cnt = 1
water.sort()
location = water[0]
for i in water[1:]:
if i in range((location), location+l):
continue
else:
location = i
cnt += 1
print(cnt)