import sys

sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    n, k = map(int, input().split())
    A = list(int(input()) for _ in range(n))

    C = []
    for i in range(1, n):
        C.append(abs(A[i] - A[i - 1]))

    res = 1
    for c in C:
        if c <= k:
            res += 1
    print(res)


if __name__ == '__main__':
    resolve()
