# cook your dish here
s=[int(i) for i in input().strip().split()]
n=s[0]
k=s[1]

l=[int(input()) for i in range(0,n)]
p=[]
#print(l)
for i in range(0,n-1):
    #print(abs(l[i+1]-l[i]))
    if(abs(l[i+1]-l[i])<=k):
        p.append(l[i])
print(len(p)+1)
