N,K=map(int,input().split()) A=list(map(int,input().split())) x=A[0] result=1 for i in range(1,N): if A[i]>=x+K: result+=1 x=A[i] print(result)