n, k = map(int, input().split()) X = [int(x) for x in input().split()] cnt0 = 1 y = X[0] for i in range(1, n): if X[i]-y >= k: cnt0 += 1 y = X[i] cnt1 = 1 y = X[n-1] for i in range(n-2, -1, -1): if y-X[i] >= k: cnt1 += 1 y = X[i] print(max(cnt0, cnt1))