import sys
def main():
    n, k = map(int, input().split())
    A = list(map(int, sys.stdin.read().split()))
    ans = 1
    tmp = A[0]
    for a in A[1:]:
        if abs(a - tmp) <= k:
            tmp = a
            ans += 1
    print(ans)
    

if __name__ == "__main__":
    main()

