n,k = map(int,input().split())
t = []
t_2 = []
c=0
for i in range(n):
    t.append(int(input()))

for i in range(n-1):
    t_2.append(abs(t[i+1]-t[i]))

for i in t_2:
    if i > k:
        c += 1

print(n-c)
