(let* ((n (read))
    (k (read))
    (a (loop for i below n collect (read)))
    (b (nth 0 a))
    (ans 1))
    (loop for i below n do
        (progn
            (if (and (not (zerop i)) (<= (abs (- b (nth i a))) k))
                (progn
                    (incf ans)
                    (setq b (nth i a))
                )
            )
        )
    )
    (format t "~D~%" ans)
)