N, K = map(int, input().split()) A = list(map(int, input().split())) ans = 0 now = -10 ** 18 for a in A: if a >= now + K: now = a ans += 1 print(ans)