import sys input = sys.stdin.readline N,K=map(int,input().split()) X=list(map(int,input().split())) mae=-1<<63 ANS=0 for x in X: if x>=mae+K: mae=x else: ANS+=1 print(N-ANS)