n,k=map(int,input().split()) *a,=map(int,input().split()) z = None x = 1 for c in a: if z is None: z = c if c-z>=k: z=c x += 1 print(x)