def count_pins(N, K, X): X.sort() count = 0 prev = X[0] for i in range(1, N): if X[i] - prev >= K: count += 1 prev = X[i] return count + 1 N, K = map(int, input().split()) X = list(map(int, input().split())) result = count_pins(N, K, X) print(result)