N, K = map(int, input().split())

A = []

for i in range(N):
    A.append(int(input()))

def abs(a):
    if a < 0:
        return -a
    return a

i = 1
while (i < N):
    
    if abs(A[i-1] - A[i]) > K:
        A.pop(i)
        N -= 1
    i += 1

print(len(A))