#dt = {} for i in x: dt[i] = dt.get(i,0)+1
import sys;input = sys.stdin.readline
inp,ip = lambda :int(input()),lambda :[int(w) for w in input().split()]

n,k = ip()
x = [inp() for i in range(n)]
ct = 0
for i in range(n-1):
    if abs(x[i]-x[i+1]) > k:
        ct += 1
print(n-ct)