import sequtils, strutils let nk, xs = stdin.readLine.split.map parseInt n = nk[0] k = nk[1] var cnt = 1 l = xs[0] if n == 1: echo 1 quit() for i in 1 ..< n: let r = xs[i] if r - l >= k: inc cnt l = r echo cnt