n,k = [int(x) for x in input().split()]
nums = []
absnums = []

for i in range(n):
      nums.append(int(input()))

#print(nums)

for i in range(len(nums)-1):
      if i == len(nums)-1:
            break
      
      if abs(nums[i]-nums[i+1]) > k:
            while(abs(nums[i] - nums[i+1]) > k):
                  del nums[i+1]
                  #print(nums)
            #absnums.append(abs(nums[i]-nums[i+1]))
      
print(len(nums))
#print(nums)
#print(absnums)