n, k = map(int, input().split())
a = []
index = 0
for i in range(n):
    tmp = int(input())
    if i > 0:
        if abs(a[index-1] - tmp) > k:
            continue
    index += 1
    a.append(tmp)
    print(a)
print(len(a))