N,K = map(int, input().split())
A = [int(input()) for i in range(N)]
B = []
for i in range(len(A)):
    if i == (len(A) - 1):
        break
    else:
        if A[i] + K >= A[i+1]:
            B.append(A[i])
        else:
            i += 1
print(len(B))