n,k = map(int,input().split()) ls = list(map(int,input().split())) c = ls[0] s = 0 for i in ls: if i-c >= k: s += 1 c = i print(s)