import re
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def v(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 6)
mod = 10**9+7
cnt = 0
ans = 0
inf = float("inf")
al = "abcdefghijklmnopqrstuvwxyz"
AL = al.upper()

N,K = I()
A = [k() for i in range(N)]
sum_a = itertools.accumulate(A)
dp = [0]*N
print(dp)

for i in range(1,N):
    if A[i]-A[i-1] <= K:
        dp[i] += dp[i-1]+1
    else:
        dp[i] = dp[i-1]

print(dp[-1])
