n,k=map(int,input().split())
x=[]
count=0
for i in range(n):
    a=int(input())
    x.append(int(a))
    
for i in range(0,n-1):
    if int(abs(x[i]-x[i+1]))<=k:
        count +=1
    else :
        x[i+1]==x[i]
print(count+1)