n,k = map(int,input().split())
a = []
for num in range(n):
  a += [int(input())]

if (len(a) == 1):
  print(1)
  exit()
if (len(a) == 2):
  if abs(a[0] - a[1])  > k:
    print(1)
  else:
    print(2)
  exit()
ch = 0
while (ch < len(a)-1):
  #print(a,ch)
  if abs(a[ch] - a[ch+1])  > k:
    a.pop(ch+1)
    ch -= 1
  ch += 1

print(len(a))