def flat(a,k):
	if len(a) == 1:
		return a
	ab = a.pop(-1)
	b = flat(a,k)
	if abs(b[-1] - ab) <= k:
		b.append(ab)
	return b



n,k = map(int,input().split())
a = []
for i in range(n):
	ain = int(input())
	a.append(ain)
b = flat(a,k)
print(len(b))