(let* ((n (read))
    (k (read))
    (a (make-array n))
    (b 0)
    (ans 1))
    (loop for i below n do 
        (setf (aref a i) (read))
    )
    (setq b (aref a 0))
    (loop for i from 1 to (- n 1) do
        (if (<= (abs (- b (aref a i))) k)
            (progn
                (incf ans)
                (setq b (aref a i))
            )
        )
    )
    (format t "~D~%" ans)
)