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

l = [int(input()) for _ in range(n)]
l2 = []

for i in range(len(l)-1):
    if abs(l[i] - l[i+1]) > k:
        l.pop(i+1)
        l.append(3000001)

a = l.index(3000001)

l = l[:a]

print(len(l))
