import sys
N,K=map(int, sys.stdin.readline().split())
A=[ int(sys.stdin.readline().strip()) for _ in range(N) ]
AA=[]
prev=None
for a in A:
    if prev is None:
        pass
    else:
        AA.append(a-prev)
    prev=a


t=0
ans=0
for a in AA:
    t+=a
    if abs(t)<=K:
        ans+=1
        t=0
ans+=1
print ans