n,k = input().split(' ')
n = int(n)
k = int(k)
a =[]
for i in range(n):
  a.append(int(input()))
l = a[:]

for i in range(1,n):
    h = a[i-1]-a[i]
    if(h<0):
        h=h*-1
    if(h>k):
     l.remove(a[i])
     
print(len(l))