ZS the Coder is coding on a crazy computer. If you don't type in a word for a c consecutive seconds, everything you typed disappear! 

More formally, if you typed a word at second a and then the next word at second b, then if b - a ≤ c, just the new word is appended to other words on the screen. If b - a > c, then everything on the screen disappears and after that the word you have typed appears on the screen.

For example, if c = 5 and you typed words at seconds 1, 3, 8, 14, 19, 20 then at the second 8 there will be 3 words on the screen. After that, everything disappears at the second 13 because nothing was typed. At the seconds 14 and 19 another two words are typed, and finally, at the second 20, one more word is typed, and a total of 3 words remain on the screen.

You're given the times when ZS the Coder typed the words. Determine how many words remain on the screen after he finished typing everything.


-----Input-----

The first line contains two integers n and c (1 ≤ n ≤ 100 000, 1 ≤ c ≤ 10^9) — the number of words ZS the Coder typed and the crazy computer delay respectively.

The next line contains n integers t_1, t_2, ..., t_{n} (1 ≤ t_1 < t_2 < ... < t_{n} ≤ 10^9), where t_{i} denotes the second when ZS the Coder typed the i-th word.


-----Output-----

Print a single positive integer, the number of words that remain on the screen after all n words was typed, in other words, at the second t_{n}.


-----Examples-----
Input
6 5
1 3 8 14 19 20

Output
3
Input
6 1
1 3 5 7 9 10

Output
2


-----Note-----

The first sample is already explained in the problem statement.

For the second sample, after typing the first word at the second 1, it disappears because the next word is typed at the second 3 and 3 - 1 > 1. Similarly, only 1 word will remain at the second 9. Then, a word is typed at the second 10, so there will be two words on the screen, as the old word won't disappear because 10 - 9 ≤ 1.

Difficulty: EASY

Solutions:
(n, c) = map(int, input().split())
L = list(map(int, input().split()))
r = 1
for i in range(1, n):
	if L[i] - L[i - 1] > c:
		r = 1
	else:
		r += 1
print(r)


(n, k) = map(int, input().split())
s = list(map(int, input().split()))
c = 1
for i in range(1, n):
	if s[i] - s[i - 1] <= k:
		c = c + 1
	else:
		c = 1
print(c)


(n, c) = map(int, input().split())
l = list(map(int, input().split()))
f = 1
if n > 1:
	for i in range(1, n):
		d = l[i] - l[i - 1]
		if d > c:
			f = 1
		else:
			f = f + 1
else:
	f = 1
print(f)


import math
from fractions import Fraction as frac
MOD = 1000000000.0 + 7

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def lcm(a, b):
	return a * b // gcd(a, b)

def solve(case_no):
	(n, k) = map(int, input().split())
	a = list(map(int, input().split()))
	ans = 1
	pr = 0
	for i in range(n):
		if a[i] - pr > k:
			ans = 1
		else:
			ans += 1
		pr = a[i]
	print(min(ans, n))
t = 1
for i in range(1, t + 1):
	solve(i)


(n, c) = map(int, input().split())
t = list(map(int, input().split()))
s = 1
for i in range(1, n):
	s += 1
	if t[i] - t[i - 1] > c:
		s = 1
print(s)


(n, c) = map(int, input().split())
l = list(map(int, input().split()))
s = 1
for i in range(n - 1, 0, -1):
	if l[i] - l[i - 1] <= c:
		s = s + 1
	else:
		break
print(s)


(n, k) = map(int, input().split())
lst = list(map(int, input().split()))
c = 0
for i in range(1, len(lst)):
	if lst[i] - lst[i - 1] > k:
		c = 0
	else:
		c += 1
print(c + 1)


import sys
import math
(n, c) = map(int, input().split())
a = list(map(int, input().split()))
s = 1
for i in range(1, n):
	if a[i] - a[i - 1] <= c:
		s += 1
	else:
		s = 1
print(s)


(n, m) = map(int, input().split())
lst = list(map(int, input().split()))
res = 1
for i in reversed(range(len(lst))):
	if i > 0 and lst[i] - lst[i - 1] <= m:
		res = res + 1
	else:
		break
print(res)


(n, c) = map(int, input().split())
a = list(map(int, input().split()))
r = 0
d = 0
for i in a:
	r = 1 + r * (i - d <= c)
	d = i
print(r)


import sys

def read_data():
	(n, c) = map(int, next(sys.stdin).split())
	numbers = list(map(int, next(sys.stdin).split()))[:n]
	return (c, numbers)

def solve(c, numbers):
	count = 0
	prev_tm = None
	for tm in reversed(numbers):
		if prev_tm is None:
			count = 1
		else:
			if prev_tm - tm > c:
				return count
			count += 1
		prev_tm = tm
	return count
(c, numbers) = read_data()
print(solve(c, numbers))


(n, c) = map(int, input().split())
l = list(map(int, input().split()))
i = n - 1
while i > 0 and l[i] - l[i - 1] <= c:
	i -= 1
print(n - i)


import math
k = input().split()
n = int(k[0])
c = int(k[1])
count = 1
words = input().split()
for i in range(n - 1):
	b = int(words[i + 1])
	a = int(words[i])
	if math.fabs(a - b) <= c:
		count += 1
	if math.fabs(a - b) > c:
		count = 1
print(count)


(n, c) = [int(x) for x in input().split()]
t = [int(x) for x in input().split()]
word = 1
for i in range(1, n):
	if t[i] - t[i - 1] <= c:
		word += 1
	else:
		word = 1
print(word)


(n, c) = [int(x) for x in input().split(' ')]
a = [int(x) for x in input().split(' ')]
cnt = 0
for i in range(len(a) - 1):
	if a[i + 1] - a[i] <= c:
		cnt += 1
	else:
		cnt = 0
print(cnt + 1)


(n, c) = map(int, input().split())
l1 = []
l = []
l = input().split()
for i in range(n):
	l[i] = int(l[i])
l1.append(l[0])
for i in range(n - 1):
	a = l[i + 1]
	if l1 == []:
		l1.append(a)
	elif a - l1[len(l1) - 1] > c:
		l1 = [a]
	else:
		l1.append(a)
print(len(l1))


(n, c) = list(map(int, input().split()))
t = list(map(int, input().split()))
add = 1
for i in range(1, n):
	if t[i] - t[i - 1] > c:
		add = 1
	else:
		add += 1
print(add)


(n, c) = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
d = 0
t = 0
for j in range(n - 1):
	if a[j + 1] - a[j] <= c:
		t = t + 1
	if t > d:
		d = t
	elif a[j + 1] - a[j] > c:
		t = 0
t = t + 1
print(t)


(n, k) = map(int, input().split())
a = list(map(int, input().split()))
cnt = 1
for i in range(1, n):
	if a[i] - a[i - 1] > k:
		cnt = 1
	else:
		cnt += 1
print(cnt)


(m, n) = map(int, input().split())
count = 0
li = list(map(int, input().split()))
for i in range(len(li) - 1):
	if li[i + 1] - li[i] > n:
		count = 0
	else:
		count += 1
print(count + 1)


(a, b) = map(int, input().split())
c = list(map(int, input().split()))
count = 1
for i in range(len(c) - 1):
	if c[i + 1] - c[i] <= b:
		count += 1
	else:
		count = 1
print(count)


(n, t) = map(int, input().split())
a = list(map(int, input().split()))
i = n - 1
res = 1
while i > 0:
	if a[i] - a[i - 1] <= t:
		res += 1
	else:
		break
	i -= 1
print(res)


(n, c) = map(int, input().split())
ls = list(map(int, input().split()))
cnt = 1
for i in range(n - 1):
	if ls[i + 1] - ls[i] <= c:
		cnt += 1
	else:
		cnt = 1
print(cnt)


(n, c) = list(map(int, input().split()))
lst = [int(x) for x in input().split()][::-1]
for i in range(len(lst) - 1):
	if lst[i] - lst[i + 1] > c:
		print(i + 1)
		break
else:
	print(len(lst))


(n, m) = [int(i) for i in input().split()]
l = [int(i) for i in input().split()]
t = 1
for i in range(1, n):
	a = l[i - 1]
	b = l[i]
	if b - a <= m:
		t = t + 1
	else:
		t = 1
print(t)


def Crazy(n, c, s):
	count = 1
	for i in range(n):
		if i > 0 and s[i] - s[i - 1] <= c:
			count = count + 1
		if i > 0 and s[i] - s[i - 1] > c:
			count = 1
	return count
(n, c) = input().split()
s = [int(c) for c in input().split()]
print(Crazy(int(n), int(c), s))


(n, c) = map(int, input().split())
seconds = list(map(int, input().split()))
words = 1
for i in range(n - 1, 0, -1):
	if seconds[i] - seconds[i - 1] <= c:
		words += 1
	else:
		break
print(words)


(n, c) = input().split()
tArr = input().split()
c = int(c)
start = -999999999999
count = 0
for i in tArr:
	end = int(i)
	if end - start <= c:
		count += 1
	else:
		count = 1
	start = end
print(count)


(n, k) = list(map(int, input().split()))
arr = list(map(int, input().split()))
ctr = []
for i in range(1, n):
	if arr[i] - arr[i - 1] > k:
		ctr.append(i)
if len(ctr) > 0:
	print(n - ctr[-1])
else:
	print(n)


(n, c) = map(int, input().split())
s = list(map(int, input().split()))
ans = 0
for i in range(n):
	if i + 1 <= n - 1:
		if s[i + 1] - s[i] > c:
			ans = 0
		else:
			ans += 1
if n > 1:
	if s[n - 1] - s[n - 2] <= c:
		ans += 1
else:
	ans = 1
print(ans if ans != 0 else '1')


(n, c) = map(int, input().split())
lst = list(map(int, input().split()))
l = len(lst)
data = []
for i in range(l - 1):
	data.append(abs(lst[i] - lst[i + 1]))
ans = 1
for i in data:
	if i <= c:
		ans += 1
	else:
		ans = 1
print(ans)


(n, c) = map(int, input().split())
k = 0
a = list(map(int, input().split()))
last = -1
for i in a:
	if i > last:
		k = 1
	else:
		k += 1
	last = i + c
print(k)


(n, c) = map(int, input().split())
l = list(map(int, input().split()))
la = 0
q = 0
rank = []
for i in range(n):
	w = l[i]
	if w - la <= c:
		q += 1
	elif w - la > c:
		q = 1
	la = w
print(q)


(n, c) = list(map(int, input().split()))
t = list(map(int, input().split()))
cnt = 1
for i in range(1, len(t)):
	if t[i] - t[i - 1] > c:
		cnt = 1
	else:
		cnt += 1
print(cnt)


def crazy(y, ls):
	c = 1
	k = len(ls)
	for i in range(k - 1):
		if ls[i + 1] - ls[i] <= y:
			c = c + 1
		else:
			c = 1
	return c
(x, y) = input().split()
x = int(x)
y = int(y)
ls = [int(i) for i in input().split()]
print(crazy(y, ls))


(n, c) = input('').split()
words = 0
f = input('').split()
pre = 0
for i in range(len(f)):
	if int(f[i]) - pre <= int(c):
		words += 1
	else:
		words = 1
	pre = int(f[i])
print(words)


(c, r) = (int(input().split()[1]), 1)
a = [*map(int, input().split())][::-1]
for (x, y) in zip(a, a[1:]):
	b = x - y > c
	r += 1 - b
	if b:
		break
print(r)


(n, c) = map(int, input().split())
l = list(map(int, input().split()))
count = 0
for i in range(n - 1):
	a = l[i]
	b = l[i + 1]
	if b - a <= c:
		count += 1
	else:
		count = 0
print(count + 1)


def main():
	(c, a, j) = (int(input().split()[1]), 0, 0)
	for (i, b) in enumerate(map(int, input().split())):
		(j, a) = (i if b - a > c else j, b)
	print(i - j + 1)
main()


(n, c) = map(int, input().split())
cnt = 0
pt = 0
for t in map(int, input().split()):
	if t - pt <= c:
		cnt += 1
	else:
		cnt = 1
	pt = t
print(cnt)


get_data_int = lambda : map(int, input().split())
(n, m) = get_data_int()
arr = sorted(get_data_int())
ans = 1
if n > 1:
	for i in reversed(range(1, n)):
		if arr[i] - arr[i - 1] <= m:
			ans += 1
		else:
			break
print(ans)


(n, m) = map(int, input().split())
l = list(map(int, input().split()))
k = 1
for i in range(n - 1):
	if l[i + 1] - l[i] <= m:
		k += 1
	else:
		k = 1
print(k)


(n, c) = map(int, input().split())
p = 1
x = [int(x) for x in input().split()]
for i in range(1, n):
	if x[i] - x[i - 1] <= c:
		p += 1
	else:
		p = 1
print(p)


(n, c) = [int(x) for x in input().split()]
t = [int(x) for x in input().split()]
ct = 0
for i in range(len(t) - 1):
	if t[i + 1] - t[i] > c:
		ct = 0
	else:
		ct += 1
print(ct + 1)


(n, c) = [int(x) for x in input().split()]
a = [int(x) for x in input().split()]
n = int(n)
c = int(c)
l = len(a)
count = 1
for i in range(1, l):
	if abs(a[i] - a[i - 1]) > c:
		count = 1
	else:
		count += 1
print(count)


s = input().split()
n = int(s[0])
c = int(s[1])
a = input().split()
k = 1
for i in range(n - 1):
	if int(a[i + 1]) - int(a[i]) <= c:
		k += 1
	else:
		k = 1
print(k)


(n, c) = map(int, input().split())
arr = input().split()
count = 1
for i in range(1, n):
	if int(arr[i]) - int(arr[i - 1]) > c:
		count = 1
	else:
		count += 1
print(count)


(n, m) = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
e = 0
for i in range(0, len(a)):
	if i == 0:
		e = e + 1
	elif a[i] - a[i - 1] > m:
		e = 0
		e = e + 1
	else:
		e = e + 1
print(e)


(n, m) = input().strip().split()[:2]
n = int(n)
m = int(m)
count = 1
l = list(map(int, input().strip().split()[:n]))
l.append('$#%#')
for x in range(len(l) - 2):
	if l[x + 1] - l[x] > m:
		count = 1
	else:
		count += 1
print(count)


(a, b) = [int(i) for i in input().split()]
c = [int(i) for i in input().split()]
words = 1
for i in range(a - 1):
	if c[i + 1] - c[i] > b:
		words = 1
	else:
		words += 1
print(words)


(n, c) = map(int, input().split())
times = list(map(int, input().split()))
words = 1
for t in range(n - 2, -1, -1):
	if times[t] + c >= times[t + 1]:
		words += 1
	else:
		break
print(words)


(n, c) = map(int, input().split())
m = 1
(a, *b) = input().split()
for i in b:
	if int(i) - int(a) > c:
		m = 1
	else:
		m += 1
	a = i
print(m)


(n, c) = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
b = [0] * (n - 1)
for i in range(n - 1):
	b[i] = a[i + 1] - a[i]
b = list(map(lambda x: x > c, b))
b = b[::-1]
if True in b:
	print(b.index(True) + 1)
else:
	print(len(b) + 1)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, queue, copy
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def I():
	return int(sys.stdin.readline())

def LS():
	return sys.stdin.readline().split()

def S():
	return input()

def main():
	(n, m) = LI()
	l = LI()
	a = l[0]
	c = 1
	for x in l[1:]:
		if x - a > m:
			c = 1
		else:
			c += 1
		a = x
	return c
print(main())


arg = [int(i) for i in input().split()]
t = [int(i) for i in input().split()]
ans = 0
n = 0
m = 0
for m in t:
	if m - n > arg[1]:
		ans = 0
	n = m
	ans += 1
print(ans)


(n, c) = map(int, input().split())
s = [int(i) for i in input().split()]
d = [s[0]]
stok = []
if n > 1:
	for i in range(1, n):
		if s[i] - s[i - 1] <= c:
			d.append(s[i])
		else:
			d.clear()
			d.append(s[i])
print(len(d))


(n, c) = (int(i) for i in input().split())
l = list(map(int, input().split()))
ans = 1
for i in range(1, n):
	if l[i] - l[i - 1] > c:
		ans = 1
	else:
		ans += 1
print(ans)


(n, c) = map(int, input().split())
arr = [int(x) for x in input().split()]
count = 1
for i in range(len(arr)):
	if i == 0:
		count = 1
		continue
	if arr[i] - arr[i - 1] > c:
		count = 1
	elif arr[i] - arr[i - 1] <= c:
		count += 1
print(count)


(n, c) = map(int, input().split())
t = [int(num) for num in input().split()]
ans = 1
for i in range(n - 1):
	if t[i + 1] - t[i] <= c:
		ans = ans + 1
	else:
		ans = 1
print(ans)


def main():
	from sys import stdin, stdout
	(n, c) = map(int, stdin.readline().split())
	tup = tuple(map(int, stdin.readline().split()))
	counter = 1
	for i in range(1, n):
		if tup[i] - tup[i - 1] <= c:
			counter += 1
		else:
			counter = 1
	stdout.write(str(counter))
main()


(n, c) = tuple(map(int, input().split()))
l = list(map(int, input().split()))
cou = 1
for x in range(1, len(l)):
	if l[x] - l[x - 1] > c:
		cou = 1
	else:
		cou = cou + 1
print(cou)


(n, c) = map(int, input().split())
l = [int(x) for x in input().split()]
ans = 1
for i in range(n - 1, 0, -1):
	if l[i] - l[i - 1] > c:
		print(ans)
		exit(0)
	ans += 1
print(ans)


(word_number, time_idle) = list(map(int, input().split()))
time_moments = list(map(int, input().split()))
last_moment = 0
for (i, moment) in enumerate(time_moments):
	if i > 0:
		if moment - time_moments[i - 1] > time_idle:
			last_moment = i
print(word_number - last_moment)


def str_list_to_int(a):
	list_of_integers = list(map(int, a))
	return list_of_integers

def check(a, t, n):
	count = 0
	for i in range(t - 1):
		if a[i + 1] - a[i] <= n:
			count += 1
		else:
			count = 0
	count += 1
	return count
(t, n) = input().split()
a = input().split()
a = str_list_to_int(a)
print(check(a, int(t), int(n)))


__author__ = 'artyom'

def main():
	(n, c) = read(3)
	a = read(3)
	i = n - 1
	while i > 0 and a[i] - a[i - 1] <= c:
		i -= 1
	return n - i

def read(mode=1, size=None):
	if mode == 0:
		return input().strip()
	if mode == 1:
		return int(input().strip())
	if mode == 2:
		return input().strip().split()
	if mode == 3:
		return list(map(int, input().strip().split()))
	a = []
	for _ in range(size):
		a.append(read(3))
	return a

def write(s='\n'):
	if s is None:
		s = ''
	if isinstance(s, tuple) or isinstance(s, list):
		s = ' '.join(map(str, s))
	s = str(s)
	print(s, end='\n')
res = main()
write(res)


(n, c) = map(int, input().split())
zs = [int(x) for x in input().split()]
words = 1
for i in range(1, n):
	if zs[i] - zs[i - 1] <= c:
		words += 1
	else:
		words = 1
print(words)


from sys import stdin
i = [[int(y) for y in x.rstrip().split()] for x in stdin.readlines()]
(l, step) = i[0]
letter = i[1]
c = 1
for x in range(l - 1, 0, -1):
	if letter[x] - letter[x - 1] <= step:
		c += 1
	else:
		break
print(c)


(n, c) = map(int, input().split())
a = list(map(int, input().split()))
w = 1
for i in range(n - 1):
	if a[i + 1] - a[i] <= c:
		w += 1
	else:
		w = 1
print(w)


(n, c) = map(int, input().split())
t = [int(t) for t in input().split()]
r = 1
for i in range(n - 1):
	if t[i + 1] - t[i] <= c:
		r += 1
	else:
		r = 1
print(r)


(n, c) = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
t = 1
for i in range(1, n):
	if a[i] - a[i - 1] <= c:
		t += 1
	else:
		t = 1
print(t)


a = input().split()
delay = int(a[1])
list1 = input().split()
list1.reverse()
list1 = list(map(int, list1))
final = int(a[0])
for i in range(len(list1) - 1):
	if list1[i] - list1[i + 1] > delay:
		final = i + 1
		break
if len(list1) == 1:
	print(1)
else:
	print(final)


(a, b) = input().split()
li = list(map(int, input().split()))
li.sort(reverse=True)
test = []
i = 0
n = 0
while i < len(li) - 1:
	if li[i] - li[i + 1] <= int(b):
		n = n + 1
	else:
		break
	i = i + 1
print(n + 1)


(n, c) = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
a.insert(0, 0)
k = 1
for i in range(1, len(a)):
	if a[i] - a[i - 1] > c:
		k = i
print(n - k + 1)


from sys import stdin, stdout
(n, c) = map(int, stdin.readline().split())
times = list(map(int, stdin.readline().split()))
ans = n
for i in range(1, n):
	if times[i] - times[i - 1] > c:
		ans = n - i
stdout.write(str(ans))


from itertools import tee

def pairwise(it):
	(it0, it1) = tee(it)
	next(it1)
	return list(zip(it0, it1))

def main():
	try:
		while True:
			(n, c) = list(map(int, input().split()))
			a = list(map(int, input().split()))
			result = 1
			for (x, y) in pairwise(reversed(a)):
				if x - y > c:
					print(result)
					break
				result += 1
			else:
				print(n)
	except EOFError:
		pass
main()


from collections import defaultdict
import sys, os, math
(n, c) = map(int, input().split())
time = list(map(int, input().split()))
ans = 1
for i in range(1, n):
	if time[i] - time[i - 1] <= c:
		ans += 1
	else:
		ans = 1
print(ans)


n = input().split(' ')
t = input().split(' ')
word = 0
t.append('0')
for x in range(int(n[0])):
	if x == int(n[0]):
		word += 1
	elif int(t[x + 1]) - int(t[x]) <= int(n[1]):
		word += 1
	else:
		word = 0
print(word)


(n, c) = map(int, input().split())
a = list(map(int, input().split()))
x = a[0]
cnt = 1
for i in range(1, n):
	y = a[i]
	if y > x + c:
		cnt = 1
	else:
		cnt += 1
	x = y
print(cnt)


(n, c) = map(int, input().split())
times = list(map(int, input().split()))
words = 1
for i in range(1, n):
	if times[i] - times[i - 1] > c:
		words = 1
	else:
		words += 1
print(words)


(n, c) = map(int, input().split())
a = list(map(int, input().split()))
f = 0
for i in range(n - 1):
	if a[i + 1] - a[i] > c:
		f = 0
	else:
		f = f + 1
print(f + 1)


import sys
input = sys.stdin.readline
ins = lambda : input().rstrip()
ini = lambda : int(input().rstrip())
inm = lambda : map(int, input().rstrip().split())
inl = lambda : list(map(int, input().split()))
out = lambda x, s='\n': print(s.join(map(str, x)))
(n, c) = inm()
a = inl()
prev = 10 ** 9 + 1
count = 0
for i in a:
	if prev >= i:
		count += 1
	else:
		count = 1
	prev = i + c
print(count)


p = s = 0
(_, c) = map(int, input().split())
for i in map(int, input().split()):
	if i - p > c:
		s = 1
	else:
		s += 1
	p = i
print(s)


(n, c) = map(int, input().split())
ans = 1
A = list(map(int, input().split()))
for j in range(1, n):
	if A[j] - A[j - 1] > c:
		ans = 1
	else:
		ans += 1
print(ans)


c = input().split()[1]
count = 0
prev = 0
for k in input().split():
	if int(k) - prev <= int(c):
		count += 1
	else:
		count = 1
	prev = int(k)
print(count)


(size, time) = map(int, input().split())
entries = list(map(int, input().split()))
in_time = 0
for i in range(size - 1):
	if entries[i + 1] - entries[i] <= time:
		in_time += 1
	else:
		in_time = 0
print(in_time + 1)


(n, m) = map(int, input().split())
t = 1
e = list(map(int, input().split()))
for i in range(1, n):
	if e[i] - e[i - 1] <= m:
		t += 1
	else:
		t = 1
print(t)


(n, c) = input().split(' ')
(n, c) = (int(n), int(c))
s = 0
m = map(int, input().split(' '))
lt = 0
for (i, e) in enumerate(m):
	if i == 0:
		lt = e
	if e - lt <= c:
		s += 1
	else:
		s = 1
	lt = e
print(s)


I = lambda : map(int, input().split())
(a, c) = I()
out = 1
l = [int(x) for x in input().split()]
for i in range(1, len(l)):
	if l[i] - l[i - 1] <= c:
		out = out + 1
	else:
		out = 1
print(out)


(n, c) = map(int, input().split())
lst = list(map(int, input().split()))
a = 1
for j in range(0, n - 1):
	if lst[j + 1] - lst[j] <= c:
		a += 1
	else:
		a = 1
print(a)


import sys
(n, c) = map(int, input().split())
arr = list(map(int, input().split()))
cnt = 1
for i in range(n - 1, -1, -1):
	if i > 0 and arr[i] - arr[i - 1] > c:
		break
	elif i > 0 and arr[i] - arr[i - 1] <= c:
		cnt += 1
print(cnt)


(n, c) = map(int, input().split())
t = list(map(int, input().split()))
a = 0
count = 0
for i in range(len(t)):
	count += 1
	if t[i] - a > c:
		count = 1
	a = t[i]
print(count)


datos = input()
datos_2 = input()
datos = datos.strip().split()
datos_2 = datos_2.strip().split()
dato_inicial = datos_2[0]
dato_final = datos_2[-1]
datos_2.insert(0, dato_inicial)
datos_2.append(dato_final)
delay = int(datos[1])
palabras = 0
for i in range(int(datos[0]) + 2):
	if int(datos_2[i]) - int(datos_2[i - 1]) <= delay:
		palabras += 1
	elif int(datos_2[i]) - int(datos_2[i - 1]) > delay:
		palabras = 0
if palabras > int(datos[0]):
	palabras = int(datos[0])
print(palabras)


(x, y) = map(int, input().split())
c = list(map(int, input().split()))
c.reverse()
i = 0
count = 0
while i < len(c) - 1 and len(c) > 1:
	if c[i] - c[i + 1] > y:
		break
	else:
		count += 1
	i += 1
print(count + 1)


N = input().split()
N = [int(i) for i in N]
A = input().split()
A = [int(i) for i in A]
count = 1
for i in range(len(A) - 1):
	if A[i + 1] - A[i] > N[1]:
		count = 1
	else:
		count += 1
print(count)


(n, c) = map(int, input().split())
x = [int(i) for i in input().split()]
pre = 0
k = 0
for i in x:
	if i - pre <= c:
		k += 1
		pre = i
	else:
		k = 1
		pre = i
print(k)


l1 = list(map(int, input().split()))
l2 = list(map(int, input().split()))
co = 1
for i in range(l1[0] - 1):
	if l2[i + 1] - l2[i] <= l1[1]:
		co += 1
	else:
		co = 1
print(co)


import sys
(n, c) = map(int, input().split())
arr = list(map(int, input().split()))
ans = 1
for i in range(n - 1):
	if arr[i + 1] - arr[i] <= c:
		ans += 1
	else:
		ans = 1
print(ans)


(n, c) = map(int, input().split())
t = list(map(int, input().split()))
ans = 1
ind = n - 1
while ind >= 1 and t[ind] - t[ind - 1] <= c:
	ans += 1
	ind -= 1
print(ans)


(n, c) = map(int, input().split())
cnt = 0
t2 = 0
for t1 in map(int, input().split()):
	cnt = [cnt + 1, 1][t1 - t2 > c]
	t2 = t1
print(cnt)


(n, c) = list(map(int, input().split(' ')))
d = list(map(int, input().split(' ')))
count = 0
pointer = 0
for k in d:
	if k - pointer <= c:
		count += 1
	else:
		count = 1
	pointer = k
print(count)


(number, c) = list(map(int, input().split()))
seconds = list(map(int, input().split()))
words = 0
for i in range(0, number - 1):
	a = seconds[i]
	b = seconds[i + 1]
	if b - a <= c:
		words += 1
	if b - a > c and words > 0:
		words = 0
words += 1
print(words)


(n, h) = map(int, input().split())
l = list(map(int, input().split()))
c = 1
for i in range(1, n):
	if l[i] - l[i - 1] > h:
		c = 0
	c += 1
print(c)


s = [int(e) for e in input().split(' ')]
(n, c) = (s[0], s[1])
s = [int(e) for e in input().split()]
rez = 1
last = s[0]
for k in range(1, n):
	if s[k] - last <= c:
		rez += 1
	else:
		rez = 1
	last = s[k]
print(rez)


def main():
	(n, c) = list(map(int, input().split(' ')))
	arr = list(map(int, input().split(' ')))
	cnt = 0
	for i in range(n):
		if i == 0 or arr[i] - arr[i - 1] > c:
			cnt = 1
		else:
			cnt += 1
	print(cnt)
main()


(n, c) = input().split()
t = input()
t = [int(x) for x in t.split()]
words = 1
for y in range(1, int(n)):
	if t[y] - t[y - 1] > int(c):
		words = 0
		words += 1
	else:
		words += 1
print(words)


(q, w) = map(int, input().split())
a = list(map(int, input().split()))
i = q - 1
if q != 1:
	while a[i] - a[i - 1] <= w:
		i -= 1
		if i == 0:
			break
print(q - i)


(n, c) = map(int, input().split())
ts = list(map(int, input().split()))[::-1]
ts = ts + [ts[-1] - c - 1]
for i in range(len(ts) - 1):
	if ts[i] > ts[i + 1] + c:
		break
print(i + 1)


(n, c) = map(int, input().split())
a = list(map(int, input().split()))
ans = 1
for i in range(1, n):
	if a[i] - a[i - 1] > c:
		ans = 0
	ans += 1
print(ans)


def main():
	(n, c) = map(int, input().split())
	xs = list(map(int, input().split()))
	rem_words = 0
	prev_time = 0
	for x in xs:
		if x - prev_time <= c:
			rem_words += 1
		else:
			rem_words = 1
		prev_time = x
	print(rem_words)
main()


(n, c) = list(map(int, input().split()))
v = [int(i) for i in input().split()]
d = v[0]
m = 1
for i in range(1, n):
	if v[i] - d > c:
		m = 1
	else:
		m = m + 1
	d = v[i]
print(m)


(n, c) = map(int, input().split())
lst = list(map(int, input().split()))
res = 1
for i in range(1, n):
	if lst[i] - lst[i - 1] <= c:
		res += 1
	else:
		res = 1
print(res)


(n, m) = map(int, input().split())
a = [-m] + list(map(int, input().split()))
print(n - max((i for i in range(1, n + 1) if a[i] - a[i - 1] > m)) + 1)


(n, c) = map(int, input().split())
A = [*map(int, input().split())]
ans = 0
last = 0
for i in range(len(A)):
	if A[i] - last > c:
		ans = 0
	ans += 1
	last = A[i]
print(ans)


(a, b) = map(int, input().split())
arr = list(map(int, input().split()))
sum = 0
ctr = 0
for s in arr:
	if s - sum <= b:
		ctr += 1
	else:
		ctr = 1
	sum = s
print(ctr)


(N, C) = map(int, input().split())
ts = list(map(int, input().split()))
count = 1
for i in range(1, len(ts)):
	if ts[i] - ts[i - 1] > C:
		count = 1
	else:
		count += 1
print(count)


import sys
from collections import defaultdict, Counter
import string

def main():
	(n, c) = [int(i) for i in input().split()]
	t = [int(i) for i in input().split()]
	words = 1
	for (i, j) in zip(t[:-1], t[1:]):
		if j - i > c:
			words = 1
		else:
			words += 1
	print(words)
main()


(n, c) = map(int, input().split())
t = input().split()
t.insert(0, 0)
i = 0
for x in range(1, n + 1):
	if int(t[x]) > int(t[x - 1]) + c:
		i = 1
	else:
		i += 1
print(i)


(n, c) = map(int, input().split())
tl = list(map(int, input().split()))
tl.insert(0, 0)
ans = 0
for i in range(n):
	sub = tl[i + 1] - tl[i]
	if sub <= c:
		ans += 1
	else:
		ans = 1
print(ans)


(n, c) = input().split()
n = int(n)
c = int(c)
x = [int(x) for x in input().split()]
words = 0
for i in range(len(x)):
	if i == 0:
		words += 1
		continue
	if x[i] - x[i - 1] <= c:
		words += 1
	else:
		words = 1
print(words)


(n, c) = map(int, input().split())
a = list(map(int, input().split()))
k = 0
b = True
for i in range(-2, -n - 1, -1):
	d = a[i + 1] - a[i]
	k += 1
	if d > c:
		print(k)
		b = False
		break
if b:
	print(k + 1)


(n, c) = map(int, input().split())
t = list(map(int, input().split()))
t.reverse()
prev = t[0]
answ = 1
for i in range(1, len(t)):
	if prev - t[i] <= c:
		answ += 1
		prev = t[i]
	else:
		break
print(answ)


(n, c) = map(int, input().split())
cnt = last = 0
for x in map(int, input().split()):
	if x > last + c:
		cnt = 1
	else:
		cnt += 1
	last = x
print(cnt)


(n, c) = map(int, input().split())
ar = [0] + list(map(int, input().split()))
ans = 0
for a in range(1, len(ar)):
	if ar[a] - ar[a - 1] <= c:
		ans += 1
	else:
		ans = 0
print(min(ans + 1, len(ar) - 1))


(n, x) = map(int, input().split())
l = list(map(int, input().split()))
c = 1
for i in range(n - 1):
	a = l[i]
	b = l[i + 1]
	if b - a <= x:
		c = c + 1
	elif b - a > x:
		c = 1
print(c)


def remain(nums, c):
	ret = []
	for i in range(len(nums) - 1):
		ret.append(nums[i + 1] - nums[i])
	a = 1
	for i in range(len(ret) - 1, -1, -1):
		if ret[i] <= c:
			a += 1
		else:
			break
	return a
(n, c) = [int(i) for i in input().split(' ')]
nums = [int(i) for i in input().split(' ')]
print(remain(nums, c))


(n, c) = map(int, input().split())
t = list(reversed(list(map(int, input().split()))))
if n == 1:
	print(1)
else:
	for (idx, ti) in enumerate(t[:-1]):
		if ti - t[idx + 1] > c:
			break
	else:
		idx += 1
	print(idx + 1)


(n, c) = map(int, input().split())
lll = list(map(int, input().split()))
l = 0
k = 0
for i in lll:
	if i - k <= c:
		l += 1
	else:
		l = 1
	k = i
print(l)


(n, c) = [int(x) for x in input().split()]
times = [int(x) for x in input().split()]
times.reverse()
check = 1
for i in range(len(times) - 1):
	if times[i] - times[i + 1] > c:
		print(i + 1)
		check = 0
		break
if check == 1:
	print(len(times))


(zs, d) = map(int, input().split())
t = list(map(int, input().split()))
c = '0'
for i in range(1, zs):
	if t[i] - t[i - 1] > d:
		c = '0'
	else:
		c += '0'
print(len(c))


(n, c) = map(int, input().split(' '))
t = list(map(int, input().split(' ')))
out = 1
for i in range(1, n):
	if t[n - i] - t[n - i - 1] <= c:
		out += 1
	else:
		break
print(out)


(n, c) = map(int, input().strip().split())
a = list(map(int, input().strip().split()))[:n]
ans = 1
for i in reversed(range(1, n)):
	if abs(a[i] - a[i - 1] <= c):
		ans = ans + 1
	else:
		break
print(ans)


(n, c) = map(int, input().split())
A = list(map(int, input().split()))
cnt = 0
for i in range(1, n):
	if A[i] - A[i - 1] > c:
		cnt = 0
	else:
		cnt += 1
print(cnt + 1)


(n, c) = map(int, input().split())
l = [int(num) for num in input().split()]
k = 1
for i in range(n - 1):
	if l[i + 1] - l[i] <= c:
		k = k + 1
	else:
		k = 1
print(k)


(n, k) = [int(x) for x in input().split()]
l = [int(x) for x in input().split()]
word = 1
qian = l[0]
for i in range(1, n):
	if l[i] - qian <= k:
		word += 1
	else:
		word = 1
	qian = l[i]
print(word)


(n, c) = [int(s) for s in input().split()]
sec = [int(s) for s in input().split()]
count = 1
for i in range(n - 1):
	if sec[i + 1] - sec[i] <= c:
		count += 1
	else:
		count = 1
print(count)


(n, t) = (int(z) for z in input().split())
times = [int(z) for z in input().split()]
cnt = 1
for i in range(1, n):
	if times[i] - times[i - 1] > t:
		cnt = 0
	cnt += 1
print(cnt)


first_line = list(map(int, input().split()))
c = first_line[1]
numbers = list(map(int, input().split()))
count = 1
for i in range(1, len(numbers)):
	last_time = numbers[i - 1] + c
	if numbers[i] <= numbers[i - 1] + c:
		count += 1
	else:
		count = 1
print(count)


[n, c] = [int(x) for x in input().split()]
times = [int(x) for x in input().split()]
remains = 0
i = 0
while i < n - 1:
	if times[i + 1] - times[i] > c:
		remains = 0
	else:
		remains += 1
	i += 1
print(remains + 1)


c = int(input().split(' ')[1])
words = list(map(int, input().split(' ')))
l = 0
last = 0
for i in words:
	if i - last > c:
		l = 1
	else:
		l += 1
	last = i
print(l)


from typing import List, Tuple

def parse_input() -> Tuple[int, int, List[int]]:
	(n, c) = [int(x) for x in input().split()]
	return (n, c, [int(x) for x in input().split()])

def solve(n: int, k: int, t: List[int]) -> int:
	prev = t[-1]
	words = 1
	for elem in t[:-1][::-1]:
		if elem >= prev - k:
			words += 1
			prev = elem
		else:
			break
	return words
(n, c, t) = parse_input()
print(solve(n, c, t))


def numb_of_words(x, c):
	count = 0
	for i in range(1, len(x)):
		if x[i] - x[i - 1] <= c:
			count += 1
		else:
			count = 0
	return count + 1

def read_array():
	x = []
	x1 = []
	x = input()
	x = x.split(' ')
	for r in range(len(x)):
		x1.append(int(x[r]))
	return x1
c = read_array()
x = read_array()
print(numb_of_words(x, c[1]))


(seconds, delay) = map(int, input().split(' '))
second = list(input().split(' '))
count = 1
for i in range(0, seconds - 1):
	if int(second[i + 1]) - int(second[i]) > delay:
		count = 1
	else:
		count = count + 1
print(count)


def solve(n, c, t):
	s = 0
	t.append(t[-1])
	for i in range(1, len(t)):
		if t[i] - t[i - 1] <= c:
			s += 1
		else:
			s = 0
	return s

def main():
	(n, c) = list(map(int, input().split()))
	t = list(map(int, input().split()))
	print(solve(n, c, t))
main()


import sys
input = sys.stdin.buffer.readline
from math import *
(n, c) = map(int, input().split())
arr = list(map(int, input().split()))
ans = 1
for i in range(1, n):
	if arr[i] - arr[i - 1] <= c:
		ans += 1
	else:
		ans = 1
print(ans)


[n, c] = map(int, input().split())
t = list(input().split())
s = c
z = 0
for i in range(n):
	if s >= int(t[i]):
		z = z + 1
		s = int(t[i]) + c
	else:
		z = 1
		s = int(t[i]) + c
print(z)


(n, c) = list(map(int, input().split()))
t = list(map(int, input().split()))[::-1]
s = 0
curr = t[0]
for time in t:
	if time + c >= curr:
		s += 1
		curr = time
	else:
		break
print(s)


(n, c) = map(int, input().split())
arr = list(map(int, input().split()))
arr = sorted(arr)
dp = []
dp.append(arr[0])
for i in range(1, len(arr)):
	if arr[i] - arr[i - 1] <= c:
		dp.append(arr[i])
	else:
		dp = []
		dp.append(arr[i])
print(len(dp))


(n, t) = map(int, input().split())
arr = list(map(int, input().split()))
r = 0
x_last = None
for x in reversed(arr):
	if x_last is None or x_last - x <= t:
		r += 1
	else:
		break
	x_last = x
print(r)


(n, c) = map(int, input().split())
t = list(map(int, input().split()))
ans = k = 0
for i in t:
	ans = 1 + ans * (i - k <= c)
	k = i
print(ans)


(a, b) = map(int, input().split())
l = list(map(int, input().split()))
r = 0
if a == 1:
	print(1)
else:
	for i in range(a - 1, 0, -1):
		if l[i] - l[i - 1] <= b:
			r += 1
		else:
			r += 1
			break
	if i == 1 and l[1] - l[0] <= b:
		r += 1
	print(r)


(a, b) = map(int, input().split())
d = list(map(int, input().split()))
s = 1
x = 0
for i in range(len(d) - 1):
	if d[i + 1] - d[i] > b:
		s = 1
	else:
		s += 1
print(s)


(x, y) = list(map(int, input().split()))
lista = list(map(int, input().split()))
ans = 1
for i in range(1, x, 1):
	if lista[i] - lista[i - 1] <= y:
		ans += 1
	else:
		ans = 1
print(ans)


a = list(map(int, input().split()))
b = list(map(int, input().split()))
time = a[1]
counter = 1
for i in range(1, a[0]):
	if b[i] - b[i - 1] <= time and counter == 0:
		counter += 2
	elif b[i] - b[i - 1] <= time:
		counter += 1
	elif b[i] - b[i - 1] > time:
		counter = 0
if counter == 0:
	counter += 1
	print(counter)
else:
	print(counter)


(xx, x) = [int(i) for i in input().split()]
y = [int(i) for i in input().split()]
a = y[0]
z = 0
for i in y:
	if i - a > x:
		z = 1
	else:
		z += 1
	a = i
print(z)


(n, m) = map(int, input().split())
c = list(map(int, input().split()))
l = 1
for i in range(len(c) - 1):
	if c[i + 1] - c[i] <= m:
		l += 1
	else:
		l = 1
print(l)


(n, c) = map(int, input().split())
numbers = list(map(int, input().split()))
count = 0
numbers.insert(0, 0)
for i in range(len(numbers) - 1):
	if numbers[i + 1] - numbers[i] <= c:
		count = count + 1
	else:
		count = 1
print(count)


(n, c) = map(int, input().split())
l = list(map(int, input().split()))
p = l[n - 1]
s = 0
for i in range(n):
	if p - l[n - 1 - i] > c:
		print(s)
		quit()
	s += 1
	p = l[n - 1 - i]
print(s)


(x, y) = map(int, input().split())
n = sorted(list(map(int, input().split())))
tot = 1
last = n[0]
for i in range(1, x):
	if n[i] - last <= y:
		tot += 1
	else:
		tot = 1
	last = n[i]
print(tot)


(n, c) = [int(x) for x in input().split()]
h = [int(y) for y in input().split()]
v = []
hv = 1
for i in range(n - 1):
	if h[i + 1] - h[i] <= c:
		v.append(hv)
	else:
		v = []
print(sum(v) + 1)


(count_ch, timeout) = map(int, input().split())
time = list(map(int, input().split()))
calc = 1
for i in range(1, count_ch):
	a = time[i - 1]
	b = time[i]
	if b - a > timeout:
		calc = 0
	calc += 1
print(calc)


(n, c) = (int(t) for t in input().split(' '))
last = 0
sum = 0
for t in input().split(' '):
	t = int(t)
	if t - last > c:
		sum = 1
	else:
		sum += 1
	last = t
print(sum)


(n, c) = map(int, input().split())
s = list(map(int, input().split()))
ans = 1
for i in range(1, len(s)):
	a = s[i - 1]
	b = s[i]
	if b - a > c:
		ans = 1
	else:
		ans += 1
print(ans)


(n, c) = [int(x) for x in input().split()]
type = [int(x) for x in input().split()]
res = 1
for i in range(1, n):
	if type[i] - type[i - 1] > c:
		res = 1
	else:
		res += 1
print(res)


import sys, math, string
input = sys.stdin.readline
L = lambda : list(map(int, input().split()))
Ls = lambda : list(input().split())
M = lambda : map(int, input().split())
(n, c) = M()
l = L()
s = 0
for i in range(n - 1, 0, -1):
	if l[i] - l[i - 1] > c:
		print(s + 1)
		exit()
	else:
		s += 1
print(s + 1)


(n, c) = map(int, input().split())
a = [int(x) for x in input().split()]
k = []
for i in range(n - 1):
	if a[i + 1] - a[i] <= c:
		k.append(1)
	if a[i + 1] - a[i] > c:
		k = []
print(len(k) + 1)


(n, c) = map(int, input().split())
A = [int(item) for item in input().split()]
cnt = 0
prev = 0
for i in A:
	if i - prev > c:
		cnt = 1
	else:
		cnt += 1
	prev = i
print(cnt)


(n, k) = map(int, input().split())
z = list(map(int, input().split()))
c = 1
for i in range(1, n):
	if z[i] - z[i - 1] > k:
		c = 0
	c += 1
print(c)


(n, c) = map(int, input().split())
val = list(map(int, input().split()))
val.reverse()
(l, ans) = (val[0], 1)
for i in range(1, n):
	if abs(val[i] - l) <= c:
		l = val[i]
		ans += 1
print(ans)


(n, c) = map(int, input().split())
sec = list(map(int, input().split(' ')))
count = 1
for i in range(len(sec) - 1):
	if sec[i + 1] - sec[i] <= c:
		count += 1
	elif sec[i + 1] - sec[i] > c:
		count = 1
print(count)


(a, b) = map(int, input().split())
s = [int(i) for i in input().split()]
s.insert(0, 0)
t = []
for i in range(1, a + 1):
	if s[i] - s[i - 1] > b:
		t = []
		t.append(s[i])
	else:
		t.append(s[i])
print(len(t))


(n, k) = map(int, input().split())
ai = list(map(int, input().split()))
a = ai[0]
cnt = 1
for i in range(1, len(ai)):
	sub = ai[i] - a
	if sub <= k:
		cnt += 1
	else:
		cnt = 1
	a = ai[i]
print(cnt)


import sys
import math
get_string = lambda : sys.stdin.readline().strip()
get_list = lambda : list(map(int, sys.stdin.readline().strip().split()))
get_intList_from_str = lambda : list(map(int, list(sys.stdin.readline().strip())))
get_charList_from_str = lambda : list(sys.stdin.readline().strip())
get_int = lambda : int(sys.stdin.readline().strip())
pt = lambda x: sys.stdout.write(str(x))
(n, c) = get_list()
lst = get_list()
count = 1
for i in range(1, n):
	if lst[i] - lst[i - 1] > c:
		count = 1
	else:
		count += 1
print(count)


(n, d) = map(int, input().split())
m = 0
counter = 0
for i in list(map(int, input().split())):
	if i - m > d:
		counter = 1
	else:
		counter += 1
	m = i
print(counter)


l = list(map(int, input().split(' ')))
n = l[0]
c = l[1]
a = list(map(int, input().split(' ')))
k = 0
for i in range(1, n):
	if a[i] - a[i - 1] > c:
		k = i
print(n - k)


(n, c) = map(int, input().split())
a1 = input().split()
a = []
for i in a1:
	a.append(int(i))
w = 0
i = 1
while i < n:
	p = a[i] - a[i - 1]
	if p <= c:
		w += 1
	else:
		w = 0
	i += 1
print(w + 1)


def map_to_list(list_, fun):
	for i in range(len(list_)):
		list_[i] = fun(list_[i])

def spaced_string_to_list(count, str_):
	arr = []
	char_index = 0
	word = ''
	for arr_index in range(count):
		while not (char_index >= len(str_) or str_[char_index] == ' '):
			word += str_[char_index]
			char_index += 1
		arr.append(word)
		word = ''
		char_index += 1
	return arr

def spaced_numbers_str_to_list(amount, str_numbers):
	numbers_list = spaced_string_to_list(amount, str_numbers)
	map_to_list(numbers_list, int)
	return numbers_list

def mad_computer(c, moments):
	words = 1
	for i in range(len(moments) - 1):
		if moments[i + 1] - moments[i] > c:
			words = 1
		else:
			words += 1
	return words
nc = spaced_numbers_str_to_list(2, input())
moments = spaced_numbers_str_to_list(nc[0], input())
print(mad_computer(nc[1], moments))


(n, c) = map(int, input().split())
t = list(map(int, input().split()))
diff = [j - i for (i, j) in zip(t[:-1], t[1:])]
for (i, d) in enumerate(reversed(diff)):
	if d > c:
		print(i + 1)
		break
else:
	print(n)


(n, c) = map(int, input().split())
a = list(map(int, input().split()))
count = 1
for i in range(n - 1):
	if a[i + 1] - a[i] <= c:
		count += 1
	if a[i + 1] - a[i] > c:
		count = 1
print(count)


(n, c) = [int(x) for x in input().split()]
t = list(map(int, input().split()))
l = [t[0]]
for i in range(1, n):
	if t[i] - t[i - 1] <= c:
		l.append(t[i])
	else:
		l.clear()
		l.append(t[i])
print(len(l))


import sys
from functools import reduce
from collections import Counter
import time
import datetime
from math import sqrt, gcd

def ip():
	return int(sys.stdin.readline())

def sip():
	return sys.stdin.readline()

def mip():
	return map(int, sys.stdin.readline().split())

def mips():
	return map(str, sys.stdin.readline().split())

def lip():
	return list(map(int, sys.stdin.readline().split()))

def matip(n, m):
	lst = []
	for i in range(n):
		arr = lip()
		lst.insert(i, arr)
	return lst

def factors(n):
	return list(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))

def minJumps(arr, n):
	jumps = [0 for i in range(n)]
	if n == 0 or arr[0] == 0:
		return float('inf')
	jumps[0] = 0
	for i in range(1, n):
		jumps[i] = float('inf')
		for j in range(i):
			if i <= j + arr[j] and jumps[j] != float('inf'):
				jumps[i] = min(jumps[i], jumps[j] + 1)
				break
	return jumps[n - 1]

def dic(arr):
	return Counter(arr)

def check_prime(n):
	if n < 2:
		return False
	for i in range(2, int(n ** 0.5) + 1, 2):
		if n % i == 0:
			return False
	return True
(n, c) = mip()
arr = lip()
count = 1
for i in range(1, n):
	if arr[i] - arr[i - 1] > c:
		count = 1
	else:
		count += 1
print(count)


import sys
inp = sys.stdin.readline().split(' ')
n = int(inp[0])
s = int(inp[1])
inp = sys.stdin.readline()[:-1].split(' ')
ans = 1
if n != 1:
	for i in range(1, len(inp)):
		if int(inp[i]) - int(inp[i - 1]) <= s:
			ans = ans + 1
		else:
			ans = 1
print(ans)


def crazy_computer(lst, c):
	result = 1
	for i in range(len(lst)):
		if i + 1 < len(lst):
			if lst[i + 1] - lst[i] <= c:
				result += 1
			else:
				result = 1
	return result
(n, C) = [int(j) for j in input().split()]
a = [int(z) for z in input().split()]
print(crazy_computer(a, C))


(n, c) = map(int, input().split())
list = [int(i) for i in input().split()]
result = []
if n == 1:
	print(1)
	exit()
for i in range(n - 1):
	result.append(list[i + 1] - list[i])
result.reverse()
j = 0
while j < len(result) and result[j] <= c:
	j += 1
print(j + 1)


def main():
	(n, t) = map(int, input().split())
	x = list(map(int, input().split()))
	l1 = []
	ans = 0
	for i in range(1, n):
		l1.append(abs(x[i - 1] - x[i]))
	ans = 1
	for i in l1:
		if i <= t:
			ans += 1
		else:
			ans = 1
	print(ans)
main()


a = list(map(int, input().split()))
b = list(map(int, input().split()))
n = 0
for r in range(1, len(b)):
	if b[r] - b[r - 1] <= a[1]:
		n = n + 1
	else:
		n = 0
print(n + 1)


(l, c) = [int(s) for s in input().split()]
a = [int(s) for s in input().split()]
words = 0
for i in range(l):
	if i == 0:
		words += 1
		continue
	elif a[i] - a[i - 1] <= c:
		words += 1
	else:
		words = 1
print(words)


(n, c) = map(int, input().split())
a = list(map(int, input().split()))
n -= 1
while n > 0:
	if a[n] - a[n - 1] > c:
		break
	n -= 1
print(len(a) - n)


(n, c) = map(int, input().split())
s = input()
a = list(map(int, s.split()))
plus = 0
count = 0
if n == 1:
	print(1)
else:
	i = 1
	while i < n:
		temp = a[i] - a[i - 1]
		if temp > c:
			count = 1
		else:
			count += 1
			plus += 1
		i = i + 1
if plus == n - 1:
	count = count + 1
if n != 1:
	print(count)


(n, c) = map(int, input().split())
w = 0
l = list(map(int, input().split()))
for i in range(len(l) - 1):
	if l[i + 1] - l[i] <= c:
		w = w + 1
	if l[i + 1] - l[i] > c:
		w = 0
print(w + 1)


(kvo, sec) = map(int, input().split())
c = list(map(int, input().split()))
k = 1
for i in range(1, kvo):
	if c[i] - c[i - 1] <= sec:
		k += 1
	else:
		k = 1
print(k)


(x, y) = map(int, input().split())
l = list(map(int, input().split()))
k = 0
for j in range(x - 1):
	if l[j + 1] - l[j] <= y:
		k += 1
	else:
		k = 0
print(k + 1)


(n, m) = map(int, input().split())
l = list(map(int, input().split()))
a = l[0]
e = 1
for i in range(1, n):
	if l[i] - a > m:
		e = 1
	else:
		e += 1
	a = l[i]
print(e)


(n, m) = map(int, input().split())
a = [int(s) for s in input().split()]
count = 1
for i in range(n - 1):
	if abs(a[i] - a[i + 1]) > m:
		count = 1
	else:
		count += 1
print(count)


(n, c) = map(int, input().split())
ts = [int(i) for i in input().split()]
w = 0
for i in range(n):
	if i == 0 or ts[i] - ts[i - 1] <= c:
		w += 1
	else:
		w = 1
print(w)


(n, c) = map(int, input().split())
ti = list(map(int, input().split()))
ans = 1
for i in range(n - 1, 0, -1):
	if ti[i] - ti[i - 1] > c:
		break
	ans += 1
print(ans)


(n, c) = [int(i) for i in input().split()]
t = [int(i) for i in input().split()]
t.append(t[-1])
m = 1
for i in range(n - 1, -1, -1):
	if t[i + 1] - t[i] > c:
		m = 0
		print(n - i - 1)
		break
if m:
	print(n)


(n, c) = map(int, input().split(' '))
L = list(map(int, input().split(' ')))
cont = 1
for k in range(n - 1):
	if L[k + 1] - L[k] > c:
		cont = 1
	else:
		cont += 1
print(cont)


(n, c) = map(int, input().split())
t = tuple(map(int, input().split()))
ans = 0
for i in range(1, n):
	if t[i] - t[i - 1] > c:
		ans = 0
	else:
		ans += 1
print(ans + 1)


(n, c) = map(int, input().split())
a = list(map(int, input().split()))
a.reverse()
count = 0
for i in range(len(a) - 1):
	if a[i] - a[i + 1] > c:
		break
	else:
		count += 1
print(count + 1)


(n, c) = [int(x) for x in input().split()]
t = [int(x) for x in input().split()]
r = 1
for i in range(1, n):
	if t[i] - t[i - 1] > c:
		r = 0
	r += 1
print(r)


def answer():
	a = [int(x) for x in input().split()]
	b = [int(x) for x in input().split()]
	c = []
	i = 0
	while i < len(b) - 1:
		diff = -b[i] + b[i + 1]
		c.append(diff)
		i += 1
	sub = 0
	i = len(c) - 1
	j = 0
	while i >= 0:
		j += 1
		if c[i] > a[1]:
			return j
		i -= 1
	return len(c) + 1
print(answer())


def solve():
	(n, c) = map(int, input().split())
	tl = [int(i) for i in input().split()]
	ans = 1
	for i in range(n - 1, 0, -1):
		if c >= tl[i] - tl[i - 1]:
			ans += 1
		else:
			break
	print(ans)
solve()


(q, c) = map(int, input().split())
step = list(map(int, input().split()))
counter = 0
for i in range(len(step) - 1):
	if step[i + 1] - step[i] <= c:
		counter += 1
	else:
		counter = 0
print(counter + 1)


(n, c) = map(int, input().split())
integers = list(map(int, input().split()))
result = 1
for i in range(1, n):
	if integers[i] - integers[i - 1] <= c:
		result += 1
	else:
		result = 1
print(result)


(n, c) = [int(i) for i in input().split()]
s = [int(i) for i in input().split()]
res = 1
for i in range(1, n):
	if s[i] - s[i - 1] <= c:
		res += 1
	else:
		res = 1
print(res)


(n, c) = [int(x) for x in input().split(' ')]
ti = [int(x) for x in input().split(' ')]
p = 0
cur = 0
for k in ti:
	if k - cur > c:
		p = 1
		cur = k
	else:
		p += 1
		cur = k
print(p)


l1 = list(map(int, input().split()))
l = list(map(int, input().split()))
c = 1
for i in range(1, l1[0]):
	if l[i] - l[i - 1] <= l1[1]:
		c += 1
	else:
		c = 1
print(c)


word = 1
(n, c) = map(int, input().split())
l = [*map(int, input().split())]
ind = n - 1
while ind > 0 and l[ind] - l[ind - 1] <= c:
	word += 1
	ind -= 1
print(word)


(n, c) = map(int, input().split())
a = list(map(int, input().split()))

def fn(a, c, n):
	b = [a[0]] + (n - 1) * [0]
	for i in range(1, n):
		b[i] = a[i] - a[i - 1]
	count = 1
	for i in range(1, n):
		if b[i] > c:
			count = 1
		else:
			count += 1
	return count
print(fn(a, c, n))


(n, c) = (int(i) for i in input().split())
a = [int(i) for i in input().split()]
count = 0
pre = 0
for i in range(n):
	if pre + c < a[i]:
		count = 1
		pre = a[i]
	else:
		count += 1
		pre = a[i]
print(count)


(n, c) = [int(x) for x in input().split()]
mas = [int(x) for x in input().split()]
(w, p) = (0, 0)
for i in mas:
	if i - w <= c:
		p += 1
	else:
		p = 1
	w = i
print(max(1, p))


(n, c) = map(int, input().split())
l = list(map(int, input().split()))
answer = 0
for i in range(0, n):
	if i == 0:
		answer = 1
	elif l[i] - l[i - 1] <= c:
		answer += 1
	else:
		answer = 1
print(answer)


d = input().split()
n = int(d[0])
c = int(d[1])
z = input().split()
S = n
P = 1
z = [int(x) for x in z]
for i in range(1, len(z)):
	if z[i] - z[i - 1] > c:
		S -= P
		P = 1
	else:
		P += 1
print(S)


(n, c) = map(int, input().split())
N = [int(i) for i in input().split()]
a = 1
for i in range(1, n):
	if N[i] - N[i - 1] <= c:
		a += 1
	else:
		a = 1
print(a)


import sys
firstIn = [int(i) for i in input().split()]
secondIn = [int(i) for i in input().split()]
il = -1
words = 0
while True:
	if abs(il) == len(secondIn):
		print(abs(il))
		exit()
	if secondIn[il] - secondIn[il - 1] > firstIn[1]:
		print(abs(il))
		exit()
	il = il - 1


(n, c) = map(int, input().split())
t = [*map(int, input().split())]
count = 0
for i in range(n):
	if i == n - 1:
		count += 1
		break
	if t[i + 1] - t[i] > c:
		count = 0
	else:
		count += 1
print(count)


(n, c) = input().split()
A = input()
B = []
(n, c) = (int(n), int(c))
for i in A.split():
	B.append(int(i))
count = 1
Sum = n
for j in range(0, n - 1):
	if B[j + 1] - B[j] <= c:
		count = count + 1
	else:
		Sum = Sum - count
		count = 1
print(Sum)


(N, C) = list(map(int, input().split()))
T = list(map(int, input().split()))
cnt = 1
for i in range(len(T) - 1):
	if T[i + 1] - T[i] <= C:
		cnt += 1
	else:
		cnt = 1
print(cnt)


(a, b) = map(int, input().split())
c = list(map(int, input().split()))
ans = 0
for i in range(a):
	if i > 0:
		x = c[i - 1]
		if c[i] - x <= b:
			ans += 1
		else:
			ans = 0
ans += 1
print(ans)


(n, c) = map(int, input().split())
x = list(map(int, input().split()))
count = 1
words = 0
for i in range(1, n):
	if x[i] - x[i - 1] > c:
		words += 1
		count = 1
	else:
		count += 1
print(count)


info = [int(x) for x in input().split(' ')]
a = [int(x) for x in input().split(' ')]
i = 1
ans = 1
while i < info[0]:
	if a[i] - a[i - 1] <= info[1]:
		ans += 1
	else:
		ans = 1
	i += 1
print(ans)


import sys, math
(n, m) = list(map(int, input().split()))
ctr = 1
z = list(map(int, input().split()))
for i in range(1, n):
	if z[i] - z[i - 1] <= m:
		ctr += 1
	else:
		ctr = 1
print(ctr)


(n, c) = (int(x) for x in input().split())
thenums = list((int(x) for x in input().split()))
answer = 1
for i in range(n - 1):
	if thenums[i + 1] - thenums[i] <= c:
		answer += 1
	else:
		answer = 1
print(answer)


I = lambda : map(int, input().split())
(n, c) = I()
a = k = 0
for b in I():
	k = 1 + k * (b - a <= c)
	a = b
print(k)


def solve():
	(n, c) = [int(s) for s in input().split()]
	m = [int(s) for s in input().split()]
	ans = 1
	for i in range(1, n):
		if m[i] - m[i - 1] <= c:
			ans += 1
		else:
			ans = 1
	print(ans)
solve()


(n, c) = [int(i) for i in input().split()]
t = [int(i) for i in input().split()]
k = 0
for i in range(len(t)):
	if t[i] - t[i - 1] <= c:
		k += 1
	else:
		k = 1
print(k)


(n, c) = input().split(' ')
n = int(n)
c = int(c)
nums = input().split(' ')
words = [0]
words.extend(nums)
screen = 0
for i in range(n + 1):
	words[i] = int(words[i])
for i in range(n):
	if words[i + 1] - words[i] <= c:
		screen += 1
	else:
		screen = 1
print(screen)


(n, c) = list(map(int, input().split()))
tt = list(map(int, input().split()))
count = 0
pred = 0
for t in tt:
	if t - pred > c:
		count = 0
	count += 1
	pred = t
print(count)


nc = [int(i) for i in input().split()]
t = [int(s) for s in input().split()]
wrd = 1
for i in range(nc[0] - 1):
	if t[i + 1] - t[i] <= nc[1]:
		wrd += 1
	else:
		wrd = 1
print(wrd)


line1 = input().split()
m = []
for i in line1:
	m.append(int(i))
a = m[0]
b = m[1]
line2 = input().split()
n = []
for i in line2:
	n.append(int(i))
p = []
for i in range(a):
	if i + 1 == a:
		break
	if n[i + 1] - n[i] <= b:
		p.append(n[i])
	if n[i + 1] - n[i] > b:
		p = []
print(len(p) + int(1))


def main():
	(n, c) = map(int, input().split())
	words = list(map(int, input().split()))
	ans = 1
	for (i, word) in enumerate(words[1:], 1):
		if words[i] - words[i - 1] > c:
			ans = 1
		else:
			ans += 1
	print(ans)
	return
main()


(n, k) = [int(i) for i in input().split()]
lst = [int(i) for i in input().split()]
nd = 1
for i in range(1, n):
	if lst[i] - lst[i - 1] <= k:
		nd += 1
	else:
		nd = 1
print(nd)


(amount, c) = [int(i) for i in input().split()]
row = [int(i) for i in input().split()]
last = 0
counter = 0
for i in range(amount):
	if row[i] - last > c:
		counter = 1
		last = row[i]
	else:
		counter += 1
		last = row[i]
print(counter)


import sys
input = sys.stdin.readline

def main():
	(n, c) = map(int, input().split())
	t = list(map(int, input().split()))
	s = 1
	i = n - 1
	while i > 0 and t[i] - t[i - 1] <= c:
		i -= 1
		s += 1
	print(s)
main()


(n, c) = map(int, input().split())
ts = list(map(int, input().split()))
w = 0
for i in reversed(range(len(ts))):
	w += 1
	if i > 0 and ts[i] - ts[i - 1] > c:
		break
print(w)


(n, c) = map(int, input().split())
t = map(int, input().split())
(ans, pre) = (0, 0)
for x in t:
	if x - pre > c:
		ans = 0
	(ans, pre) = (ans + 1, x)
print(ans)


(n, c) = [int(i) for i in input().split()]
t = [int(i) for i in input().split()]
tot = 1
for i in range(n - 1, -1, -1):
	if i == 0:
		break
	if t[i] - t[i - 1] > c:
		break
	tot += 1
print(tot)


def main():
	(n, c) = map(int, input().split())
	a = list(map(int, input().split()))
	count = 1
	for i in range(1, n):
		if a[i] - a[i - 1] > c:
			count = 1
		else:
			count += 1
	print(count)
main()


(n, c) = map(int, input().split())
count = 1
seconds = list(map(int, input().split()))
for i in range(n - 1):
	if seconds[i + 1] - seconds[i] > c:
		count = 1
	else:
		count = count + 1
print(count)


[n, c] = [int(x) for x in input().split()]
arr = [int(x) for x in input().split()]
count = 1
t = arr[0]
for i in range(1, n):
	if arr[i] - t <= c:
		count += 1
	else:
		count = 1
	t = arr[i]
print(count)


(n, c) = input().split(' ')
(n, c) = (int(n), int(c))
times = [int(t) for t in input().split(' ')]
time_now = times[0]
num_words = 1
for t in times[1:]:
	elapsed_time = t - time_now
	if elapsed_time > c:
		num_words = 1
	else:
		num_words += 1
	time_now = t
print(num_words)


(n, c) = map(int, input().split())
a = list(map(int, input().split()))
h = 1
if n == 1:
	print(1)
	exit()
for x in range(n - 1):
	if a[x + 1] - a[x] > c:
		h = 1
	else:
		h += 1
print(h)


(x, y) = map(int, input().split())
A = list(map(int, input().split()))
count = 1
for i in range(len(A) - 1):
	if A[i + 1] - A[i] <= y:
		count += 1
	else:
		count = 1
print(count)


(n, c) = map(int, input().split())
t = list(map(int, input().split()))
time = 0
number_of_words = 0
for action in t:
	if action - time > c:
		number_of_words = 1
	else:
		number_of_words += 1
	time = action
print(number_of_words)


class Main:

	def __init__(self):
		(self.n, self.c) = [int(x) for x in input().split()]
		self.t = [int(x) for x in input().split()]

	def main(self):
		remaining_words = 1
		for i in range(self.n - 2, -1, -1):
			if self.t[i + 1] - self.t[i] <= self.c:
				remaining_words += 1
			else:
				break
		print(remaining_words)
Main().main()


def input_array():
	return [int(x) for x in input().split(' ')]
arr1 = input_array()
arr2 = input_array()
counter = 0
str_result = []
for el in arr2:
	if counter == 0:
		str_result.append(el)
		counter += 1
		continue
	if arr2[counter] - arr2[counter - 1] <= arr1[1]:
		str_result.append(el)
	else:
		str_result = [el]
	counter += 1
output = ''
print(len(str_result))


(n, c) = map(int, input().split())
t_old = 0
count = 0
if n == 1:
	print(1)
else:
	for t in map(int, input().split()):
		if t - t_old <= c:
			count += 1
		else:
			count = 1
		t_old = t
	print(count)


import sys
(n, c) = map(int, sys.stdin.readline().split())
tlist = list(map(int, sys.stdin.readline().split()))[::-1]
ans = 1
item = tlist[0]
for i in tlist[1:]:
	if item - i <= c:
		item = i
		ans += 1
	else:
		break
print(ans)


(n, c) = [int(w) for w in input().split()]
x = [int(e) for e in input().split()]
x = x[::-1]
d = 1
if n == 1:
	print(1)
else:
	for i in range(0, n - 1):
		if x[i] - x[i + 1] <= c:
			d += 1
		else:
			break
	print(d)


(n, c) = map(int, input().split())
(p, ans) = (0, 0)
for t in map(int, input().split()):
	ans = ans + 1 if t - p <= c else 1
	p = t
print(ans)


(n, c) = map(int, input().split())
w = 0
nw = 0
l = list(map(int, input().split()[:n]))
for i in range(n):
	if i == 0:
		w += 1
	else:
		a = l[i]
		b = l[i - 1]
		if abs(b - a) <= c:
			w += 1
		else:
			w = 1
print(w)


(n, c) = map(int, input().split(' '))
num = list(map(int, input().split(' ')))
i = n - 2
ans = 1
while i >= 0:
	if num[i + 1] - num[i] > c:
		break
	ans += 1
	i -= 1
print(ans)


(n, c) = map(int, input().split())
arr = list(map(int, input().split()))
ans = 1
for i in range(n - 2, -1, -1):
	if arr[i] + c < arr[i + 1]:
		break
	ans += 1
print(ans)


import sys
(n, c) = [int(i) for i in input().split(' ')]
t = [int(i) for i in input().split(' ')]
summa = 0
for i in range(n):
	if summa == 0:
		summa = 1
	elif t[i] - t[i - 1] > c:
		summa = 1
	else:
		summa += 1
print(summa)


def letters(arr, c):
	ans = 1
	for i in range(1, len(arr)):
		if arr[i] - arr[i - 1] <= c:
			ans += 1
		else:
			ans = 1
	return ans
(n, c) = list(map(int, input().rstrip().split()))
arr = list(map(int, input().rstrip().split()))
print(letters(arr, c))


(a, n) = list(map(int, input().split()))
m = list(map(int, input().split()))
b = 1
for i in range(a - 1):
	if m[i + 1] - m[i] <= n:
		b += 1
	else:
		b = 1
print(b)


(n, c) = [int(i) for i in input().split(' ')]
times = [int(i) for i in input().split(' ')]
num_words = 0
since_last_time = 0
for i in range(len(times) - 1, -1, -1):
	if times[i] - times[i - 1] <= c:
		num_words += 1
	else:
		num_words += 1
		break
print(num_words)


num1 = input()
num2 = input()
a = []
b = []

def get_the_data(count, num, arr):
	for i in range(0, len(num)):
		if num[i] == ' ':
			arr.append(int(num[count:i]))
			count = i + 1
		elif i == len(num) - 1:
			arr.append(int(num[count:len(num)]))
	return arr
arr1 = get_the_data(0, num1, a)
arr2 = get_the_data(0, num2, b)
time = arr1[1]
char = 0
for i in range(len(arr2)):
	if i == 0:
		char += 1
	elif arr2[i] - arr2[i - 1] <= time:
		char += 1
	else:
		char = 1
print(char)


import sys
from collections import defaultdict

def get_ints():
	return map(int, I().split())

def get_list():
	return list(map(int, I().split()))

def I():
	return sys.stdin.readline().strip()
(n, t) = get_ints()
L = get_list()
count = 1
s = 0
for i in range(1, n):
	if L[i] - L[i - 1] <= t:
		count += 1
	else:
		count = 1
print(count)


b = list(map(int, input().split()))[1]
k = list(map(int, input().split()))[::-1]
f = 1
for i in range(0, len(k) - 1):
	if k[i] - k[i + 1] > b:
		break
	f += 1
print(f)


(n, c) = [int(i) for i in input().split()]
times = [int(i) for i in input().split()]
words = 1
for i in range(1, len(times)):
	if times[i] - times[i - 1] <= c:
		words += 1
	else:
		words = 1
print(words)


(n, c) = map(int, input().split())
m = list(map(int, input().split()))
total = 1
for i in range(1, n):
	if m[i] - m[i - 1] <= c:
		total += 1
	else:
		total = 1
print(total)


(n, c) = map(int, input().split())
arr = list(map(int, input().split()))
cnt = 1
ind = 0
while ind < n - 1:
	if abs(arr[ind] - arr[ind + 1]) <= c:
		cnt += 1
	else:
		cnt = 1
	ind += 1
print(cnt)


(n, c) = map(int, input().split())
t = list(map(int, input().split()))
words = prev_ti = 0
for ti in t:
	if ti - prev_ti > c:
		words = 0
	prev_ti = ti
	words += 1
print(words)


(a, b) = tuple(map(int, input().split()))
words = list(map(int, input().split()))
n_of_words = len(words)
count = 1
for i in range(1, n_of_words):
	if words[i] - words[i - 1] > b:
		count = 1
	else:
		count += 1
print(count)


nc = input().split()
n = nc[0]
c = nc[1]
a = [int(i) for i in input().split()]
words = 1
for i in range(len(a) - 1):
	if a[i + 1] - a[i] <= int(c):
		words += 1
	else:
		words = 1
print(words)


line = input().split()
n = int(line[0])
c = int(line[1])
line = input().split()
line = [int(i) for i in line]
count = 1
for i in range(1, n):
	if line[i] - line[i - 1] <= c:
		count += 1
	else:
		count = 1
print(count)


num = [int(n) for n in input().split()]
time = [int(m) for m in input().split()]
count = 1
for i in range(1, len(time)):
	if time[i] - time[i - 1] <= num[1]:
		count = count + 1
	else:
		count = 1
print(count)


i = lambda : map(int, input().split())
(n, c) = i()
z = list(i())
a = k = 0
for b in z:
	k = 1 + k * (b - a <= c)
	a = b
print(k)


s = input()
n = int(s.split()[0])
c = int(s.split()[1])
t = ['0'] + input().split()
ans = 0
for i in range(n, 0, -1):
	ans += 1
	if int(t[i]) - int(t[i - 1]) > c:
		break
print(ans)


(n, m) = map(int, input().split())
ar = list(map(int, input().split()))
count = 1
for i in range(n - 1):
	if ar[i + 1] - ar[i] <= m:
		count += 1
	else:
		count = 1
print(count)


__author__ = 'Think'
data = input().split()
delay = int(data[1])
words = input().split()
words.reverse()
words = [int(i) for i in words]
count = 0
prev = words[0]
for i in words:
	if prev - i > delay:
		break
	else:
		count += 1
		prev = i
print(count)


(n, c) = map(int, input().split())
A = list(map(int, input().split()))
p = k = 0
for a in A:
	if a - p > c:
		k = 1
	else:
		k += 1
	p = a
print(k)


(n, k) = map(int, input().strip().split(' '))
L = list(map(int, input().split(' ')))
count = 1
a = 0
for i in range(1, n):
	if L[i] - L[i - 1] <= k:
		count += 1
	else:
		count = 1
print(count)


(x, y) = input().split()
x = int(x)
y = int(y)
counter = 1
string = input().split()
for i in range(1, x):
	if int(string[i]) - int(string[i - 1]) <= y:
		counter += 1
	else:
		counter = 1
print(counter)


is_debug = False
(n, c) = map(int, input().split())
t = list(map(int, input().split()))
w = 1
for i in range(1, len(t)):
	d = t[i] - t[i - 1]
	if d > c:
		w = 1
	else:
		w = w + 1
print(f'{w}')


(n, c) = list(map(int, input().split()))
ts = list(map(int, input().split()))
lengths = list(map(lambda a: a[0] - a[1], zip(ts[1:], ts[:-1])))
lengths.reverse()
out = 1
for i in lengths:
	if i <= c:
		out += 1
	else:
		break
print(out)


import sys
from math import sqrt, floor, factorial
from collections import deque
inp = sys.stdin.readline
read = lambda : list(map(int, inp().strip().split()))

def solve():
	(n, c) = read()
	arr = read()
	ans = 1
	for i in range(n - 1):
		ans += 1 if arr[i + 1] - arr[i] <= c else -(ans - 1)
	print(ans)
solve()


(n, c) = map(int, input().split())
(p, v) = (0, 0)
for t in map(int, input().split()):
	v = [v + 1, 1][t - p > c]
	p = t
print(v)


(n, c) = map(int, input().split())
t = list(map(int, input().split()))
counter = 1
last = t[0]
for i in range(1, n):
	if t[i] - last <= c:
		counter += 1
	else:
		counter = 1
	last = t[i]
print(counter)


def main():
	(n, m) = [int(v) for v in input().split()]
	vals = [int(v) for v in input().split()]
	cur = 0
	for i in range(1, n):
		if vals[i] - vals[i - 1] > m:
			cur = i
	print(n - cur)
main()


def crazy(n, c, a):
	count = 1
	for i in range(1, n):
		if a[i] - a[i - 1] <= c:
			count = count + 1
		else:
			count = 1
	print(count)
list1 = [int(i) for i in input().split()]
list2 = [int(i) for i in input().split()]
crazy(list1[0], list1[1], list2)


(n, c) = map(int, input().split())
typing = list(map(int, input().split()))
words = 1
for i in range(1, n):
	if typing[i] - typing[i - 1] > c:
		words = 0
	words += 1
print(words)


(a, b) = map(int, input().split())
i = ans = 0
inp = list(map(int, input().split()))
while i < len(inp) - 1:
	if inp[i + 1] - inp[i] > b:
		ans = 0
	else:
		ans += 1
	i += 1
print(ans + 1)


(a, b) = [int(i) for i in input().split()]
lst = [int(i) for i in input().split()]
cnt = 0
for i in range(1, a):
	if b < lst[i] - lst[i - 1]:
		cnt = 0
	else:
		cnt += 1
print(cnt + 1)


(n, c) = (int(v) for v in input().split())
list1 = [int(u) for u in input().split()]
list1 = list1[::-1]
ans = 1
for i in range(1, n):
	if list1[i - 1] - list1[i] <= c:
		ans += 1
	else:
		break
print(ans)


def words_left(numbers, c):
	last_typed = 0
	word_count = 0
	for number in numbers:
		if number - last_typed <= c:
			word_count += 1
		else:
			word_count = 1
		last_typed = number
	return word_count
(n, c) = map(int, input().split())
numbers = list(map(int, input().split()))
print(words_left(numbers, c))


(n, c) = map(int, input().split(' '))
l = list(map(int, input().split(' ')))
l.reverse()
counter = 0
if n == 1:
	print(1)
	exit(0)
for i in range(0, n - 1):
	if l[i] - l[i + 1] > c:
		counter += 1
		break
	else:
		counter += 1
	if i == n - 2:
		counter += 1
print(counter)


import sys
(a, b) = map(int, input().split())
arr = [int(i) for i in input().split()]
summ = 0
if a == 1:
	print(1)
	sys.exit(0)
for i in range(1, a):
	if arr[i] - arr[i - 1] > b:
		summ = 0
	else:
		summ += 1
	if i == a - 1:
		summ += 1
print(summ)


(n, d) = list(map(int, input().split()))
w = list(map(int, input().split()))
c = 0
for i in range(len(w) - 1, 0, -1):
	if w[i] - w[i - 1] <= d:
		c += 1
	else:
		break
print(c + 1)


l = list(map(int, input().split()))
c = l[1]
p = list(map(int, input().split()))
cnt = 0
for i in range(len(p) - 1):
	if p[i + 1] - p[i] <= c:
		cnt += 1
	else:
		cnt = 0
print(cnt + 1)


(n, c) = [int(x) for x in input().split()]
time = [int(x) for x in input().split()]
num = 1
for i in range(1, n):
	if time[i] - time[i - 1] <= c:
		num = num + 1
	else:
		num = 1
print(num)


import sys
(n, c) = map(int, sys.stdin.readline().split())
t = list(map(int, sys.stdin.readline().split()))
res = 1
for i in range(1, n):
	if t[i] - t[i - 1] <= c:
		res += 1
	else:
		res = 1
print(res)


(N, C) = list(map(int, input().split()))
T = list(map(int, input().split()))
ans = 1
for i in range(1, N):
	if T[i] - T[i - 1] > C:
		ans = 1
	else:
		ans += 1
print(ans)


(n, c) = [int(x) for x in input().split(' ')]
l = [int(x) for x in input().split(' ')]
count = 0
for i in range(1, n):
	if l[i] - l[i - 1] > c:
		count = 0
	else:
		count += 1
if count == 0:
	print('1')
else:
	print(count + 1)


(n, c) = (int(i) for i in input().split())
a = []
a = [int(i) for i in input().split()]
(s, m) = (0, 0)
temp = a[0]
for i in range(len(a)):
	m = a[i] - temp
	if m <= c:
		s += 1
	else:
		s = 0
	temp = a[i]
if n != 1 and a[n - 1] - a[n - 2] <= c and (s != n):
	s += 1
if s != 0:
	print(s)
else:
	print(1)


(n, c) = map(int, input().split())
t = list(map(int, input().strip().split()))[:n]
count = 1
for i in range(n - 1):
	if t[i + 1] - t[i] <= c:
		count += 1
	else:
		count = 1
print(count)


(a, b) = map(int, input().split())
ans = input().split()
c = 0
count = 1
l = []
for i in ans:
	i = int(i)
	l.append(i)
while c < a - 1:
	if l[c + 1] - l[c] <= b:
		count += 1
	elif l[c + 1] - l[c] > b:
		count = 1
	c += 1
print(count)


(n, c) = map(int, input().split())
s = 1
l = list(map(int, input().split()))
a = l[0]
b = 0
for i in range(1, len(l)):
	b = l[i]
	if b - a <= c:
		s += 1
	else:
		s = 1
	a = l[i]
print(str(s), end='')


(n, m) = [int(i) for i in input().split()]
ls = [int(i) for i in input().split()]
i = 1
count = 1
while i < len(ls):
	if ls[i] - ls[i - 1] > m:
		count = 1
	else:
		count += 1
	i += 1
print(count)


(n, c) = map(int, input().split())
l = [int(x) for x in input().split()]
i = n - 1
while i > 0 and l[i] - l[i - 1] <= c:
	i -= 1
print(n - i)


string = input()
numbers = string.split(' ')
n = int(numbers[0])
c = int(numbers[1])
string = input()
numbers = string.split(' ')
for x in range(n):
	numbers[x] = int(numbers[x])
words = 1
for x in range(n - 1):
	if numbers[x + 1] - numbers[x] > c:
		words = 0
	words += 1
print(words)


(n, c) = map(int, input().split())
lst = [int(i) for i in input().split()]
count = 1
for i in range(0, n - 1):
	if lst[i + 1] - lst[i] <= c:
		count = count + 1
	else:
		count = 1
print(count)


(n, c) = [int(elem) for elem in input().split()]
commands = [int(elem) for elem in input().split()]
counter = 1
for i in range(1, n):
	if commands[i] - commands[i - 1] > c:
		counter = 1
	else:
		counter += 1
print(counter)


import sys
from bisect import bisect_left, bisect_right, insort
from collections import deque, Counter
from math import gcd, sqrt, factorial, ceil, log10
from itertools import permutations
from heapq import heappush, heappop, heapify
inf = float('inf')
mod = 1000000007
mini = 1000000007

def max_subarray(array):
	max_so_far = max_ending_here = array[0]
	start_index = 0
	end_index = 0
	for i in range(1, len(array) - 1):
		temp_start_index = temp_end_index = None
		if array[i] > max_ending_here + array[i]:
			temp_start_index = temp_end_index = i
			max_ending_here = array[i]
		else:
			temp_end_index = i
			max_ending_here = max_ending_here + array[i]
		if max_so_far < max_ending_here:
			max_so_far = max_ending_here
			if temp_start_index != None:
				start_index = temp_start_index
			end_index = i
	print(max_so_far, start_index, end_index)

def ncr(n, r):
	d = 10 ** 9 + 7
	num = fact(n)
	den = fact(r) * fact(n - r) % d
	den = pow(den, d - 2, d)
	return num * den % d

def sieve(n):
	prime = [True for i in range(n + 1)]
	lst = []
	p = 2
	while p * p <= n:
		if prime[p]:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p = p + 1
	for i in range(2, n + 1):
		if prime[i]:
			lst.append(i)
	return lst

def binary(number):
	result = 0
	while number:
		result = result + 1
		number = number & number - 1
	return result

def calculate_factors(n):
	hh = [1] * (n + 1)
	p = 2
	while p * p < n:
		if hh[p] == 1:
			for i in range(p * 2, n, p):
				hh[i] = 0
		p += 1
	total = 1
	for p in range(2, n + 1):
		if hh[p] == 1:
			count = 0
			if n % p == 0:
				while n % p == 0:
					n = int(n / p)
					count += 1
				total *= count + 1
	return total

def prime_factors(n):
	i = 2
	factors = set()
	while i * i <= n:
		if n % i:
			i += 1
		else:
			factors.add(n // i)
			n = n // i
			factors.add(i)
	if n > 1:
		factors.add(n)
	return factors

def isPrime(n):
	if n == 2 or n == 3:
		return True
	if n % 2 == 0 or n < 2:
		return False
	for i in range(3, int(n ** 0.5) + 1, 2):
		if n % i == 0:
			return False
	return True

def solve(n):
	if n == 1:
		return 1
	p = 2
	result = []
	while p * p <= n:
		if n % p == 0:
			result.append(p)
			result.append(n // p)
		p = p + 1
	return result

def atMostSum(arr, n, k):
	_sum = 0
	cnt = 0
	maxcnt = 0
	for i in range(n):
		if _sum + arr[i] <= k:
			_sum += arr[i]
			cnt += 1
		elif sum != 0:
			_sum = _sum - arr[i - cnt] + arr[i]
		maxcnt = max(cnt, maxcnt)
	return maxcnt

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def input():
	return sys.stdin.readline().strip()
(n, c) = get_ints()
count = 1
Arr = get_array()
for i in range(1, n):
	if Arr[i] - Arr[i - 1] <= c:
		count += 1
	else:
		count = 1
print(count)


from sys import stdin
_input = stdin.readline
(_int, _range) = (int, range)

def solution():
	(l, c) = [_int(i) for i in _input().split()]
	arr = [_int(i) for i in _input().split()]
	old = arr[0]
	ans = 1
	for i in _range(1, l):
		if arr[i] - old > c:
			ans = 1
		else:
			ans += 1
		old = arr[i]
	print(ans)
solution()


n = list(map(int, input().split()))
arr = list(map(int, input().split()))
words = 1
a = arr[0]
for x in range(1, n[0]):
	b = arr[x]
	if b - a > n[1]:
		words = 1
	else:
		words = words + 1
	a = b
print(words)


p = list(map(int, input().split()))
n = p[0]
c = p[1]
q = list(map(int, input().split()))
count = 1
for i in range(n - 1):
	if q[i + 1] - q[i] > c:
		count = 1
	else:
		count += 1
print(count)


(n, m) = input().split()
(n, m) = (int(n), int(m))
time = [int(x) for x in input().split()]
ans = 1
for i in range(1, n):
	if time[i] - time[i - 1] <= m:
		ans += 1
	else:
		ans = 1
print(ans)


from queue import Queue
read = lambda : list(map(int, input().split()))
(n, k) = read()
A = read()
cnt = 1
for i in range(n):
	if i > 0:
		if A[i] - A[i - 1] <= k:
			cnt += 1
		else:
			cnt = 1
print(cnt)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def main():
	(n, k) = LI()
	a = LI()
	r = 1
	for i in range(n - 2, -1, -1):
		if a[i + 1] - a[i] > k:
			return r
		r += 1
	return r
print(main())


(n, c) = map(int, input().split())
a = [int(i) for i in input().split()]
k = 1
for i in range(n - 1, 0, -1):
	if a[i] - a[i - 1] > c:
		break
	else:
		k += 1
print(k)


input1 = input().split()
n = int(input1[0])
c = int(input1[1])
input2 = input().split()
counter = 1
for i in range(1, n):
	if int(input2[i]) - int(input2[i - 1]) > c:
		counter = 0
	counter += 1
print(counter)


(n, c) = map(int, input().split())
words = [int(x) for x in input().split()]
last_entered = words[0]
count = 1
for w in range(1, len(words)):
	if words[w] - last_entered > c:
		count = 1
	else:
		count += 1
	last_entered = words[w]
print(count)


(n, c) = [int(i) for i in input().split()]
arr = [int(i) for i in input().split()]
l = len(arr)
count = 1
for i in range(1, l):
	if arr[i] - arr[i - 1] > c:
		count = 1
	else:
		count += 1
print(count)


p = 0
n = input()
(n, c) = n.split()
n = int(n)
c = int(c)
t = list(map(int, input().split()))
t.reverse()
for x in range(0, n - 1):
	if t[x] - t[x + 1] <= c:
		p = p + 1
	else:
		break
print(p + 1)


firstInLine = input().split()
secondInLine = input().split()
wordCount = int(firstInLine[0])
scanDelay = int(firstInLine[1])
remCases = wordCount - 1
remWords = wordCount
Case = 0
while remCases > 0:
	if int(secondInLine[Case + 1]) - int(secondInLine[Case]) > scanDelay:
		remWords = wordCount - (Case + 1)
	Case = Case + 1
	remCases = remCases - 1
print(remWords)


import sys
f = list(input().split())
c = int(f[1])
f = input().split()
a = [int(x) for x in f]
n = len(a)
t = a[0]
res = 1
for i in range(1, n):
	if a[i] - a[i - 1] <= c:
		res += 1
	else:
		res = 1
print(res)


(n, c) = [int(i) for i in input().split()]
t = [int(i) for i in input().split()]
w = []
for i in range(len(t)):
	if len(w) > 0:
		if t[i] - t[i - 1] > c:
			w = []
	w.append(t[i])
print(len(w))


(n, c) = map(int, input().split())
q = [int(i) for i in input().split()]
count = 0
a = -2000000000
for i in range(n):
	b = q[i]
	if b - a > c:
		count = 1
	else:
		count += 1
	a = b
print(count)


(n, c) = [int(i) for i in input().split()]
x = [int(i) for i in input().split()]
res = [x[i] - x[i - 1] for i in range(1, len(x))]
res.insert(0, x[0])
count = 0
for i in res:
	if i <= c:
		count += 1
	else:
		count = 0
print(min(count + 1, n))


(n, c) = map(int, input().split())
a = [int(s) for s in input().split()]
count = 1
for i in range(n - 1):
	if a[i + 1] - a[i] <= c:
		count += 1
	else:
		count = 1
print(count)


n = input().split(' ')
t = input().split(' ')
a = 0
for i in range(len(t)):
	if i + 1 < len(t) and int(t[i + 1]) - int(t[i]) <= int(n[1]):
		a += 1
	elif i + 1 < len(t):
		a = 0
a += 1
print(a)


(n, c) = [int(s) for s in input().split()]
t = [int(s) for s in input().split()]
words = 1
for i in reversed(range(n - 1)):
	if t[i + 1] - t[i] <= c:
		words += 1
	else:
		break
print(words)


b = list(map(int, input().split()))
(n, delay) = (b[0], b[1])
a = list(map(int, input().split()))
words = 1
for i in range(1, n):
	if a[i] - a[i - 1] <= delay:
		words += 1
	else:
		words = 1
print(words)


(n, m) = map(int, input().split())
a = []
x = 1
n1 = list(map(int, input().split()))
for i in range(n):
	a.append(n1[i])
for i in range(n - 1):
	a1 = a[i + 1] - a[i]
	if a1 <= m:
		x += 1
	else:
		x = 1
print(x)


(n, m) = [int(tt) for tt in input().split()]
arr = [int(tt) for tt in input().split()]
ans = 1
for i in range(n - 1):
	if arr[i + 1] - arr[i] > m:
		ans = 1
	else:
		ans = ans + 1
print(ans)


(n, c) = map(int, input().split())
cnt = 0
arr = [*map(int, input().split())]
for i in range(n):
	prev = 0 if i == 0 else arr[i - 1]
	if arr[i] - prev <= c:
		cnt += 1
	else:
		cnt = 1
print(cnt)


a = input().split()
n = int(a[0])
c = int(a[1])
b = input().split()
seconds = [int(i) for i in b]
count = 1
k = 1
while k < n:
	if seconds[k] - seconds[k - 1] <= c:
		count += 1
	else:
		count = 1
	k += 1
print(count)


(n, c) = map(int, input().split())
s = list(map(int, input().split()))
cnt = 0
flag = 0
for t in s:
	if t - flag > c:
		cnt = 0
	cnt += 1
	flag = t
print(cnt)


(n, c2) = map(int, input().split())
l = list(map(int, input().split()))
i = 1
c = l[0]
c1 = 0
while i < len(l):
	if l[i] - l[i - 1] <= c2:
		c1 += 1
	else:
		c1 = 0
	c = l[i]
	i += 1
print(c1 + 1)


(n, c) = map(int, input().split())
t = list(map(int, input().split()))
i = len(t) - 1
while i > 0:
	if t[i] - t[i - 1] > c:
		break
	i -= 1
print(len(t) - i)


(n, m) = map(int, input().split())
a = list(map(int, input().split()))
z = 0
for i in range(len(a) - 1):
	if a[i + 1] - a[i] > m:
		z = 0
	else:
		z += 1
print(z + 1)


(n, k) = map(int, input().split())
nums = list(map(int, input().split()))
i = n
n -= 1
while n and nums[n] - nums[n - 1] <= k:
	n -= 1
print(i - n)


import sys
(T, C) = map(int, sys.stdin.readline().split())
nums = list(map(int, sys.stdin.readline().split()))
answer = 0
check = False
i = 0
while True:
	if i == T:
		break
	if i == 0:
		answer += 1
		i += 1
		continue
	if i > 0 and nums[i] - nums[i - 1] <= C:
		answer += 1
	elif i > 0 and nums[i] - nums[i - 1] > C:
		answer = 1
	i += 1
print(answer)


words = 0
l = input().split()
n = int(l[0])
c = int(l[1])
list = input().split()
for (index, item) in enumerate(list):
	if index < len(list) - 1 and int(item) + c < int(list[index + 1]):
		words = -1
	words += 1
print(words)


n = list(map(int, input().split()))
b = list(map(int, input().split()))
j = 0
k = 1
if n[0] > 1:
	for i in range(n[0] + 1):
		j = j + 1
		if j < n[0]:
			if b[j] - b[j - 1] <= n[1]:
				k = k + 1
			else:
				k = 1
	print(k)
else:
	print(1)


f = input().split()
n = int(f[0])
c = int(f[1])
res = 1
a = [int(i) for i in input().split()]
for i in range(1, n):
	if a[i] - a[i - 1] > c:
		res = 1
	else:
		res += 1
print(res)


(n, time_limit) = map(int, input().split())
inputs = list(map(int, input().split()))
for i in range(-1, -n, -1):
	if inputs[i] - inputs[i - 1] > time_limit:
		print(-i)
		exit()
print(n)


(n, m) = map(int, input().split())
l = list(map(int, input().split()))
ans = 1
for i in range(n - 1):
	if abs(l[i] - l[i + 1]) <= m:
		ans += 1
	else:
		ans = 1
print(ans)


(n, c) = [int(x) for x in input().split(' ')]
time = [int(y) for y in input().split(' ')]
count = 1
for i in range(len(time) - 1):
	if time[i + 1] - time[i] <= c:
		count += 1
	else:
		count = 1
print(count)


from __future__ import division, print_function
import os, sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().strip().split(' '))

def msi():
	return map(str, input().strip().split(' '))

def li():
	return list(mi())

def dmain():
	sys.setrecursionlimit(1000000)
	threading.stack_size(1024000)
	thread = threading.Thread(target=main)
	thread.start()
import sys
input = sys.stdin.readline
scan_int = lambda : int(input())
scan_string = lambda : input().rstrip()
read_list = lambda : list(read())
read = lambda : map(int, input().split())
read_float = lambda : map(float, input().split())

def ceil(x):
	if x != int(x):
		x = int(x) + 1
	return x

def factorial(x, m):
	val = 1
	while x > 0:
		val = val * x % m
		x -= 1
	return val

def fact(x):
	val = 1
	while x > 0:
		val *= x
		x -= 1
	return val

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def lcm(a, b):
	return a * b // math.gcd(a, b)

def is_integer(n):
	return math.ceil(n) == math.floor(n)

def nCr(n, k):
	if k > n:
		return 0
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

def primefs(n):
	primes = {}
	while n % 2 == 0 and n > 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0 and n > 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	(prime[0], prime[1]) = (False, False)
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime

def phi(n):
	result = n
	p = 2
	while p * p <= n:
		if n % p == 0:
			while n % p == 0:
				n = n // p
			result = result * (1.0 - 1.0 / float(p))
		p = p + 1
	if n > 1:
		result = result * (1.0 - 1.0 / float(n))
	return int(result)

def is_prime(n):
	if n == 0:
		return False
	if n == 1:
		return True
	for i in range(2, int(n ** (1 / 2)) + 1):
		if not n % i:
			return False
	return True

def next_prime(n, primes):
	while primes[n] != True:
		n += 1
	return n
MAXN = int(100000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i
spf = [0 for i in range(MAXN)]

def factoriazation(x):
	res = []
	for i in range(2, int(x ** 0.5) + 1):
		while x % i == 0:
			res.append(i)
			x //= i
	if x != 1:
		res.append(x)
	return res

def factors(n):
	res = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			res.append(i)
			res.append(n // i)
	return list(set(res))

def int_array():
	return list(map(int, input().strip().split()))

def float_array():
	return list(map(float, input().strip().split()))

def str_array():
	return input().strip().split()

def binary_search(low, high, w, h, n):
	while low < high:
		mid = low + (high - low) // 2
		if check(mid, w, h, n):
			low = mid + 1
		else:
			high = mid
	return low

def check(beauty, s, n, count):
	pass
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
from itertools import permutations
import math
import bisect as bis
import random
import sys
import collections as collect

def solve():
	(n, c) = read()
	a = read_list()
	counter = 1
	for i in range(n - 1, 0, -1):
		diff = a[i] - a[i - 1]
		if diff <= c:
			counter += 1
		else:
			break
	print(counter)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
for i in range(1):
	solve()


info = input()
info = info.split()

def aprovado(tiempo_c, seg1, seg2):
	if int(seg2) - int(seg1) <= int(tiempo_c):
		return True
	else:
		return False
cantidad_numeros = info[0]
tiempo_c = info[1]
numeros = input()
numeros = numeros.split()
contador = 0
for i in range(len(numeros) - 1):
	estado = aprovado(tiempo_c, numeros[i], numeros[i + 1])
	if estado == True:
		contador += 1
	else:
		contador = 0
contador += 1
print(contador)


(a, n) = list(map(int, input().split()))
t = list(map(int, input().split()))
p = 0
for k in range(a - 1):
	if t[k + 1] - t[k] <= n:
		p += 1
	else:
		p = 0
print(p + 1)


[n, c] = list(map(int, input().split()))
t = list(map(int, input().split()))
res = 1
for i in range(1, n):
	d = t[i] - t[i - 1]
	if d > c:
		res = 1
	else:
		res += 1
print(res)


(n, c) = map(int, input().split())
a = list(map(int, input().split()))
sub = []
ans = 1
for i in range(n - 1):
	if a[i + 1] - a[i] <= c:
		ans += 1
	else:
		sub.append(ans)
		ans = 1
print(ans)


(a, b) = map(int, input().split())
s = list(map(int, input().split()))
c = 0
if a == 1:
	print(a)
else:
	for n in range(a - 1):
		if s[n + 1] - s[n] <= b:
			if c == 0:
				c = c + 2
			else:
				c = c + 1
		else:
			c = 0
		if n == a - 2 and c == 0:
			c = 1
	print(c)


(n, c) = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
res = []
for i in range(1, len(a)):
	if a[i] - a[i - 1] > c:
		res = []
	elif a[i] - a[i - 1] <= c:
		res.append(1)
print(len(res) + 1)


class CodeforcesTask716ASolution:

	def __init__(self):
		self.result = ''
		self.n_c = []
		self.times = []

	def read_input(self):
		self.n_c = [int(x) for x in input().split(' ')]
		self.times = [int(x) for x in input().split(' ')]

	def process_task(self):
		words = 0
		last = -self.n_c[1]
		for word in self.times:
			if word - last > self.n_c[1]:
				words = 1
			else:
				words += 1
			last = word
		self.result = str(words)

	def get_result(self):
		return self.result
Solution = CodeforcesTask716ASolution()
Solution.read_input()
Solution.process_task()
print(Solution.get_result())


(n, c) = map(int, input().rstrip().split())
l = list(map(int, input().rstrip().split()))
count = 1
for i in range(1, n):
	count = count + 1 if l[i] - l[i - 1] <= c else 1
print(count)


c = int(input().split()[1])
a = 0
s = 0
for i in input().split():
	if int(i) - a <= c:
		s += 1
	else:
		s = 1
	a = int(i)
print(s)


s = [int(a) for a in input().split()]
n = s[0]
c = s[1]
w = [int(b) for b in input().split()]
cnt = 1
i = 1
while i < len(w):
	if w[i] - w[i - 1] > c:
		cnt = 1
		i = i + 1
	else:
		cnt = cnt + 1
		i = i + 1
print(cnt)


try:
	(n, c) = list(map(int, input().split()))
	l = list(map(int, input().split()))
	cnt = 1
	for i in range(0, n - 1):
		if l[i + 1] - l[i] <= c:
			cnt += 1
		else:
			cnt = 1
	print(cnt)
except:
	pass


(n, c) = [int(x) for x in input().split()]
tab = list(map(int, input().split()))
counter = 1
for i in range(1, n):
	if tab[i] - tab[i - 1] > c:
		counter = 1
	else:
		counter += 1
print(counter)


(n, t) = list(map(int, input().strip().split()))
k = list(map(int, input().strip().split()))
words = 0
prevSec = 0
for i in k:
	words += 1
	if prevSec != 0 and i - prevSec > t:
		words = 1
	prevSec = i
print(words)


(n, c) = map(int, input().split())
l = list(map(int, input().split()))
count = 0
l2 = []
for i in range(n - 1):
	r = l[i + 1] - l[i]
	l2.append(r)
for i in l2:
	if i <= c:
		count += 1
	else:
		count = 0
print(count + 1)


a = list(map(int, input().split()))
b = list(map(int, input().split()))
count = 1
if a[0] > 1:
	for x in range(a[0] - 1):
		if b[x + 1] - b[x] <= a[1]:
			count += 1
		else:
			count = 1
else:
	count = 1
print(count)


(n, c) = map(int, input().split())
ar = list(map(int, input().split()))
flag = False
for i in range(n - 1, 0, -1):
	if ar[i] - ar[i - 1] > c:
		print(n - i)
		flag = True
		break
if not flag:
	print(n)


n = list(map(int, input().split()))
n1 = input().split()
lst = []
if len(n1) != 1:
	for i in range(n[0] - 1):
		if int(n1[i + 1]) - int(n1[i]) <= n[1]:
			lst.append(n1[i])
		else:
			lst = []
	if n1[-2] in n1:
		lst.append(n1[-1])
	print(len(lst))
else:
	print('1')


(n, c) = (int(x) for x in input().split())
a = [int(x) for x in input().split()]
w = 1
for i in range(1, n):
	if a[i] - a[i - 1] > c:
		w = 1
	else:
		w += 1
print(w)


(a, b) = map(int, input().split())
c = list(map(int, input().split()))
k = 1
for i in range(1, a):
	if c[i] - c[i - 1] > b:
		k = 1
	else:
		k = k + 1
print(k)


(n, c) = map(int, input().split())
mylist = list(map(int, input().split()))
res = 0
check = 1
for i in range(n):
	if check == 1:
		res = res + 1
		check = 0
	elif mylist[i] - mylist[i - 1] > c:
		res = 1
	else:
		res = res + 1
print(res)


def main():
	(words, timer) = map(int, input().split())
	times = [int(i) for i in input().split()]
	ans = 1
	for i in range(1, words):
		if times[i] - times[i - 1] > timer:
			ans = 1
		else:
			ans += 1
	print(ans)
main()


(n, k) = map(int, input().split())
cont = 0
listed = list(map(int, input().split()))
for i in range(n):
	if i == 0:
		cont += 1
	elif listed[i] - listed[i - 1] <= k:
		cont += 1
	else:
		cont = 1
print(cont)


def solve(test):
	ans = 1
	tmp = 1
	(n, c) = map(int, input().split())
	a = list(map(int, input().split()))
	for i in range(1, n):
		if a[i] - a[i - 1] <= c:
			tmp += 1
		else:
			tmp = 1
	print(tmp)
t = 1
for _ in range(t):
	solve(_ + 1)


(x, y) = map(int, input().split())
z = list(map(int, input().split()))
out = 0
i = 0
j = 0
while i < x - 1:
	if z[i + 1] - z[i] <= y:
		j += 1
	elif z[i + 1] - z[i] > y:
		j = 0
	i += 1
print(j + 1)


(n, c) = [int(r) for r in input().split()]
ts = [int(r) for r in input().split()]
count = 1
prev = ts[0]
for t in ts[1:]:
	if t - prev > c:
		count = 1
	else:
		count += 1
	prev = t
print(count)


(a, b) = list(map(int, input().split(' ')))
s = list(map(int, input().split(' ')))
s = s[::-1]
flag = 1
counter = 0
i = 0
while flag:
	if i + 1 == a or s[i] - s[i + 1] > b:
		flag = 0
	counter = counter + 1
	i = i + 1
print(counter)


(n, c) = map(int, input().split())
a = 0
s = 0
b = list(map(int, input().split()))
for i in range(n):
	if b[i] - a <= c:
		s += 1
	elif i != n:
		s = 1
	else:
		s = 0
	a = b[i]
print(s)


(n, c) = map(int, input().split())
l = [int(i) for i in input().split()]
cnt = 0
for i in range(0, n - 1):
	if l[i + 1] - l[i] <= c:
		cnt += 1
	else:
		cnt = 0
print(cnt + 1)


import collections

def main():
	(n, c) = list(map(int, input().split()))
	a = list(map(int, input().split()))
	r = 0
	p = -c
	for i in a:
		d = i - p
		if d > c:
			r = 0
		r += 1
		p = i
	print(r)

def __starting_point():
	main()
__starting_point()


(n, k) = map(int, input().split())
arr = list(map(int, input().split()))
words = 1
for i in range(1, n):
	if arr[i] - arr[i - 1] <= k:
		words += 1
	else:
		words = 1
print(words)


a = input().split()
n = int(a[0])
c = int(a[1])
a = input().split()
x = 0
z = 0
for i in range(n):
	a[i] = int(a[i])
	if a[i] - x > c:
		z = 1
	else:
		z += 1
	x = a[i]
print(z)


(n, k) = map(int, input().split(' '))
arr = [int(i) for i in input().split(' ')]
res = 1
for i in range(1, n):
	if arr[i] - arr[i - 1] > k:
		res = 1
	else:
		res += 1
print(res)


(n, c) = map(int, input().split())
x = list(map(int, input().split()))
t = 0
i = 0
while True:
	if n == 1:
		if x[0] > c:
			t = 0
			break
		else:
			t = -1
			break
	elif abs(x[i] - x[i + 1]) <= c:
		t += 1
	else:
		t = 0
	i += 1
	if i + 1 >= n:
		break
print(t + 1)


(n, c) = list(map(int, input().split()))
sec = list(map(int, input().split()))
sol = 1
for i in range(1, n):
	if sec[i] - sec[i - 1] <= c:
		sol += 1
	else:
		sol = 1
print(sol)


def solve(a, n, c):
	res = 1
	tmp = a[0]
	for i in range(1, n):
		if a[i] - tmp <= c:
			res += 1
		else:
			res = 1
		tmp = a[i]
	return res
(n, c) = map(int, input().split())
a = list(map(int, input().split()))
print(solve(a, n, c))


(n, c) = map(int, input().split())
L = list(map(int, input().split()))
count = 1
index = 1
while index < n:
	if L[index] - L[index - 1] <= c:
		count += 1
	else:
		count = 1
	index += 1
print(count)


x = list(map(eval, input().split()))
C = int(x[1])
x = list(map(eval, input().split()))
ans = 1
pre = x[0]
for i in range(1, len(x)):
	if x[i] - pre <= C:
		ans += 1
	else:
		ans = 1
	pre = x[i]
print(ans)


def main():
	(n, c) = map(int, input().split())
	time = list(map(int, input().split()))
	ans = 1
	for i in range(1, n):
		if time[i] - time[i - 1] <= c:
			ans += 1
		else:
			ans = 1
	print(ans)
main()


(n, c) = list(map(int, input().split()))
t = list(map(int, input().split()))
ans = 0
last = t[-1]
for e in reversed(t):
	if last - e > c:
		break
	else:
		ans += 1
		last = e
print(ans)


(a, b) = map(int, input().split())
k = list(map(int, input().split()))
count = 1
for i in range(1, a):
	if k[i] - k[i - 1] > b:
		count = 1
	else:
		count += 1
	z = i
print(count)


li = input().split()
c = int(li[1])
arr = input().split()
arr = list(map(int, arr))
j = arr[0]
ans = 0
for i in arr:
	if i - j <= c:
		ans = ans + 1
	else:
		ans = 1
	j = i
print(ans)


(n, c) = map(int, input().split())
t = list(map(int, input().split()))
ans = 0
tmp = t[0]
for i in t:
	if i - tmp <= c:
		ans += 1
	else:
		ans = 1
	tmp = i
print(ans)


(n, c) = input().split()
n = int(n)
c = int(c)
A = input().split()
words = 0
for i in range(0, len(A)):
	if int(A[i]) - int(A[i - 1]) > c:
		words = 0
	words = words + 1
print(words)


a = input().split()
n = int(a[0])
c = int(a[1])
w = 1
s = input().split()
for i in range(n - 1):
	if int(s[i + 1]) - int(s[i]) <= c:
		w += 1
	elif int(s[i + 1]) - int(s[i]) > c:
		w -= w - 1
print(w)


l = list(input().split())
n = int(l[0])
c = int(l[1])
l = list(input().split())
l = [int(i) for i in l]
length = 0
for i in range(n - 1):
	if l[i + 1] - l[i] <= c:
		length += 1
	else:
		length = 0
print(length + 1)


(n, c) = map(int, input().split())
arr = list(map(int, input().split()))
ct = 0
for i in range(1, n):
	if arr[i] - arr[i - 1] <= c:
		ct += 1
	else:
		ct = 0
print(ct + 1)


import sys
(N, C) = [int(i) for i in input().split()]
nums = [int(i) for i in input().split()]
if N == 1:
	print(1)
	sys.exit()
words = 0
for i in range(N - 1):
	t1 = nums[i]
	t2 = nums[i + 1]
	if t2 - t1 > C:
		words = 0
	else:
		words += 1
words += 1
print(words)


I = lambda : map(int, input().split())
(n, c) = I()
a = [int(x) for x in input().split()]
i = 0
while n > i + 1 and a[n - 1 - i] - a[n - 2 - i] <= c:
	i += 1
print(i + 1)


def CrazyComp(l, c):
	count = 0
	for i in range(len(l) - 1):
		if l[i + 1] - l[i] <= c:
			count += 1
		else:
			count = 0
	count += 1
	print(count)
c = input()
c = int(c.split()[1])
l = input()
l = [int(x) for x in l.split()]
CrazyComp(l, c)


a = list(map(int, input().split()))
n = a[0]
c = a[1]
s = list(map(int, input().split()))
t = 1
i = 1
b = s[0]
while i < len(s):
	if s[i] <= b + c:
		t = t + 1
		b = s[i]
	else:
		t = 1
		b = s[i]
	i = i + 1
print(t)


def main():
	[n, c] = [int(_) for _ in input().split()]
	t = [int(_) for _ in input().split()]
	i = n - 2
	while i >= 0 and t[i + 1] - t[i] <= c:
		i -= 1
	print(n - 1 - i)
main()


from sys import stdin
(n, c) = map(int, stdin.readline().split())
arr = stdin.readline().split()
cnt = 1
for i in range(0, n - 1):
	a = int(arr[i])
	b = int(arr[i + 1])
	if b - a <= c:
		if cnt != 0:
			cnt += 1
		else:
			cnt += 2
	elif b - a > c and i == n - 2:
		cnt = 1
	else:
		cnt = 0
print(cnt)


k = list(map(int, input().split()))
ll = list(map(int, input().split()))
n = k[0]
c = k[1]
l = []
r = 0
for i in range(1, len(ll)):
	r += 1
	if ll[i] - ll[i - 1] > c:
		r = 0
print(r + 1)


def screen(n, c, a):
	r = 0
	for i in range(1, n):
		if a[i] - a[i - 1] <= c:
			r += 1
		else:
			r = 0
	print(r + 1)
(n, c) = list(map(int, input().split()))
a = list(map(int, input().split()))
screen(n, c, a)


(n, m) = map(int, input().split())
x = list(map(int, input().split()))
a = 1
if n == 1:
	print(1)
	exit()
else:
	for i in range(n):
		if x[i + 1] - x[i] <= m:
			a += 1
		else:
			a = 1
		i += 1
		if i + 1 >= n:
			break
print(a)


import math
import collections
import bisect
import heapq
import time
import random
import itertools
import sys
(N, C) = map(int, input().split())
A = [int(x) for x in input().split()]
ans = 1
p = A[0]
for t in A[1:]:
	if t - p > C:
		ans = 1
	else:
		ans += 1
	p = t
print(ans)


(n, c) = map(int, input().split())
sum = 1
words = list(map(int, input().split()))
for k in range(1, n):
	if words[k] - words[k - 1] <= c:
		sum += 1
	else:
		sum = 1
print(sum)


from functools import reduce
(N, C) = list(map(int, input().split()))
L = list(map(int, input().split()))
S = 0
for index in range(N - 1):
	(A, B) = (L[index], L[index + 1])
	if B - A <= C:
		S += 1
	else:
		S = 0
print(S + 1)


mn = [int(i) for i in input().split()]
m = mn[0]
n = mn[1]
c = 0
l = [int(i) for i in input().split()]
for i in range(1, len(l)):
	if l[i] - l[i - 1] <= n:
		c = c + 1
	else:
		c = 0
print(c + 1)


(n, c) = map(int, input().split())
arr = [int(x) for x in input().split()]
rem = 1
last = arr[0]
for i in range(1, n):
	if arr[i] - last > c:
		rem = 1
	else:
		rem += 1
	last = arr[i]
print(rem)


(n, c) = map(int, input().split(' '))
p = [int(x) for x in input().split(' ')]
z = [p[0]]
for i in range(1, n):
	if p[i] - p[i - 1] <= c:
		z.append(p[i])
	if p[i] - p[i - 1] > c:
		z = [p[i]]
print(len(z))


(n, c) = str(input()).split()
(n, c) = (int(n), int(c))
line = str(input()).split()
line = [int(it) for it in line]
num = 1
for i in range(n - 1, 0, -1):
	if line[i] - line[i - 1] <= c:
		num += 1
	else:
		break
print(num)


import sys
import math
import bisect

def main():
	(n, k) = map(int, input().split())
	A = list(map(int, input().split()))
	ans = 0
	for i in range(n):
		if i == 0 or A[i] - A[i - 1] <= k:
			ans += 1
		else:
			ans = 1
	print(ans)
main()


(n, m) = map(int, input().split())
a = list(map(int, input().split()))
x = 0
ans = 0
for i in a:
	if i - x > m:
		ans = 0
	ans += 1
	x = i
print(ans)


(cnt, batch) = input().split()
cnt = int(cnt)
batch = int(batch)
times = list(map(int, input().split()))
flag = 1
for i in range(len(times) - 1):
	if times[-i - 1] - times[-i - 2] > batch:
		flag = 0
		break
if flag:
	print(len(times))
else:
	print(i + 1)


arr = list(map(int, input().split()))
arr2 = list(map(int, input().split()))
printed = False
for i in range(arr[0] - 1):
	if arr2[arr[0] - 1 - i] - arr2[arr[0] - 2 - i] > arr[1]:
		print(i + 1)
		printed = True
		break
if printed == False:
	print(arr[0])


n = input()
c = input()
x = n.split(' ')
y = c.split(' ')
l = []
for i in range(len(y) - 1):
	if int(y[i + 1]) - int(y[i]) <= int(x[1]):
		l.append(i)
	else:
		l = []
print(len(l) + 1)


(n, c) = map(int, input().split())
ans = 0
prev = None
for s in map(int, input().split()):
	if prev is None:
		ans += 1
		prev = s
	elif s - prev <= c:
		ans += 1
		prev = s
	else:
		ans = 1
		prev = s
print(ans)


(n, c) = map(int, input().split())
l = input().split()
word = [l[0]]
for i in range(1, n):
	if i < n and int(l[i]) - int(l[i - 1]) <= c:
		word.append(l[i])
	else:
		word.clear()
		word.append(l[i])
print(len(word))


(n, c) = [int(i) for i in input().split()]
l = [int(i) for i in input().split()]
words = 1
for w in range(n - 1):
	if l[w + 1] - l[w] > c:
		words = 1
	else:
		words += 1
print(words)


text = input()
n = int(text.split(' ')[0])
c = int(text.split(' ')[1])
text = input()
tmp = 1
t = text.split(' ')
for i in range(0, n - 1):
	if int(t[i + 1]) - int(t[i]) <= c:
		tmp += 1
	else:
		tmp = 1
print(tmp)


(words, time) = [int(i) for i in input().split()]
seconds = [int(i) for i in input().split()]
wordsOnDispl = 1
for i in range(1, words):
	if seconds[i] - seconds[i - 1] <= time:
		wordsOnDispl += 1
	else:
		wordsOnDispl = 0
		wordsOnDispl += 1
print(wordsOnDispl)


user_input = input()
numbers = user_input.split(' ')
n = int(numbers[0])
c = int(numbers[1])
counter = 1
user_input = input()
time = user_input.split(' ')
previous = int(time[0])
for i in range(1, n):
	current = int(time[i])
	diff = current - previous
	if diff > c:
		counter = 1
	else:
		counter += 1
	previous = current
print(counter)


(words, k) = map(int, input().split())
lst = [int(x) for x in input().split()]
count = 1
for i in range(len(lst) - 1):
	if lst[i + 1] - lst[i] <= k:
		count += 1
	else:
		count = 1
print(count)


lst = input().split()
lst2 = input().split()
ans = 0
sec = int(lst[1])
if int(lst[0]) == 1:
	ans = 1
for i in range(int(lst[0])):
	if int(lst[0]) != 1 and abs(int(lst2[i - 1]) - int(lst2[i])) <= sec:
		ans += 1
	if int(lst[0]) != 1 and abs(int(lst2[i - 1]) - int(lst2[i])) > sec:
		ans = 0
		ans += 1
print(ans)


from sys import stdin
max_val = int(10000000000000.0)
min_val = int(-10000000000000.0)

def read_int():
	return int(stdin.readline())

def read_ints():
	return [int(x) for x in stdin.readline().split()]

def read_str():
	return input()

def read_strs():
	return [x for x in stdin.readline().split()]
(nb_comps, interval) = read_ints()
times = read_ints()[::-1]
ans = 1
for i in range(1, nb_comps):
	if times[i - 1] - times[i] > interval:
		break
	ans += 1
print(ans)


seconds = int(input().split(' ')[1])
data = [int(info) for info in input().split(' ')]
buff = 0
before = 0
for i in data:
	if i - before > seconds:
		buff = 1
	else:
		buff += 1
	before = i
print(buff)


import sys
input = sys.stdin.readline
from math import log2, log, ceil

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def nCr(n, k):
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return res

def upper_bound(a, x, lo=0):
	hi = len(a)
	while lo < hi:
		mid = (lo + hi) // 2
		if a[mid] < x:
			lo = mid + 1
		else:
			hi = mid
	return lo

def primefs(n):
	primes = {}
	while n % 2 == 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime
MAXN = int(1000000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i
spf = [0 for i in range(MAXN)]
spf_sieve()

def factoriazation(x):
	ret = {}
	while x != 1:
		ret[spf[x]] = ret.get(spf[x], 0) + 1
		x = x // spf[x]
	return ret

def int_array():
	return list(map(int, input().strip().split()))

def str_array():
	return input().strip().split()
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
(n, c) = int_array()
ans = 1
a = int_array()
for i in range(1, n):
	if a[i] - a[i - 1] > c:
		ans = 1
	else:
		ans += 1
print(ans)


(a, b) = input().split()
(a, b) = (int(a), int(b))
c = input().split()
d = c[0]
f = 0
for i in range(a):
	if int(c[i]) - int(d) <= b:
		f += 1
	else:
		f = 1
	d = c[i]
print(f)


str = input()
tokens = str.split(' ')
n = int(tokens[0])
c = int(tokens[1])
str = input()
tokens = str.split(' ')
count_words_on_screen = 0
time_last_typed = 0
for token in tokens:
	time_now = int(token)
	time_elapsed = time_now - time_last_typed
	if time_elapsed > c:
		count_words_on_screen = 1
	else:
		count_words_on_screen += 1
	time_last_typed = time_now
print(count_words_on_screen)


(rs, ri, rai) = (input, lambda : int(input()), lambda : list(map(int, input().split())))
(n, c) = rai()
a = rai()
r = 0
for i in range(1, n):
	if a[i] - a[i - 1] > c:
		r = 0
	else:
		r += 1
print(r + 1)


u = input().split()
n = int(u[0])
c = int(u[1])
res = 0
b = list(map(int, input().split()))
for i in range(n):
	if i == 0:
		res += 1
	elif b[i] - b[i - 1] > c:
		res = 0
		res += 1
	else:
		res += 1
print(res)


(a, b) = map(int, input().split())
l = list(map(int, input().split()))
ans = 1
for i in range(1, a):
	if l[i] - l[i - 1] > b:
		ans = 1
	else:
		ans += 1
print(ans)


(n, c) = [int(x) for x in input().strip().split(' ')]
arr = list(map(lambda x: int(x), input().strip().split(' ')))
i = n - 1
while arr[i] - arr[i - 1] <= c and i > 0:
	i -= 1
print(n - i)


nc = list(map(int, input().split()))
t = list(map(int, input().split()))
words = 1
temp = 1
while temp < nc[0]:
	if t[temp] - t[temp - 1] > nc[1]:
		words = 1
	else:
		words += 1
	temp += 1
print(words)


line = input().split()
(n, c) = [int(i) for i in line]
line = input().split()
line = [int(i) for i in line]
ans = 1
for i in range(1, n):
	if line[i] - line[i - 1] <= c:
		ans += 1
	else:
		ans = 1
print(ans)


ip = input().split(' ')
nofw = int(ip[0])
interval = int(ip[1])
ti = input().split()
ti1 = list(map(int, ti))
result = 0
for x in range(len(ti1)):
	if x == 0:
		result = 1
	elif ti1[x] - ti1[x - 1] <= interval:
		result = result + 1
	else:
		result = 1
print(result)


(N, c) = map(int, input().split())
count = 1
X = list(map(int, input().split()))
for i in range(1, N):
	if X[i] - X[i - 1] > c:
		count = 1
	else:
		count += 1
print(count)


read = lambda : map(int, input().split())
(n, c) = read()
t = list(read())
num = 1
for i in range(1, n):
	if t[i] - t[i - 1] > c:
		num = 1
	else:
		num += 1
print(num)


(n, c) = map(int, input().split(' '))
list1 = list(map(int, input().split(' ')))
ct = 1
for j in range(1, n):
	if list1[j] - list1[j - 1] > c:
		ct = 1
	else:
		ct += 1
print(ct)


(a, c) = map(int, input().split())
l = list(map(int, input().split()))
j = 1
for i in range(len(l) - 1):
	if abs(l[i + 1] - l[i]) <= c:
		j += 1
	else:
		j = 1
print(j)


(n, c) = map(int, input().split())
a = sorted(map(int, input().split()))
ans = 1
for i in range(1, n):
	if a[i] - a[i - 1] <= c:
		ans += 1
	else:
		ans = 1
print(ans)


(n, c) = map(int, input().split())
t = list(map(int, input().split()))
ans = 1
cur = t[n - 1]
for i in reversed(range(n - 1)):
	if cur - t[i] > c:
		break
	cur = t[i]
	ans += 1
print(ans)


(a, b) = map(int, input().split())
mat = input().split()
for i in range(a):
	mat[i] = int(mat[i])
result = 1
for i in range(1, a):
	if mat[a - i] - mat[a - i - 1] > b:
		break
	result += 1
print(result)


(n, c) = [int(x) for x in input().split()]
number = [int(x) for x in input().split()]
total = 0
for i in range(n - 1):
	if number[i + 1] - number[i] <= c:
		total += 1
	else:
		total = 0
print(total + 1)


(n, c) = map(int, input().split())
t = [int(z) for z in input().split()]
w = []
a = [0 for i in range(n - 1)]
m = 1
for i in range(n - 1):
	a[i] = t[i + 1] - t[i]
for i in a:
	if i <= c:
		m += 1
	else:
		m = 1
w.append(m)
print(max(w))


(n, m) = map(int, input().split())
A = list(map(int, input().split(' ')[:n]))
temp = 1
for i in range(n - 1):
	if A[i + 1] - A[i] <= m:
		temp += 1
	else:
		temp = 1
print(temp)


(ne, c) = map(int, input().split(' '))
v = [int(x) for x in input().split(' ')]
minn = 0
count = 1
if ne == 1:
	print('1')
else:
	for i in range(1, ne):
		if v[i] - v[i - 1] <= c:
			count += 1
		else:
			count = 1
		if count > minn:
			minn = count
	print(count)


(n, c) = map(int, input().split())
w = list(map(int, input().split()))
nw = 1
for x in range(n - 1):
	if w[x + 1] - w[x] > c:
		nw = 1
	else:
		nw += 1
print(nw)


n = [int(i) for i in input().split()]
num = n[0]
c = n[1]
typed = 1
x = [int(i) for i in input().split()]
for i in range(num - 1):
	if abs(x[i + 1] - x[i]) > c:
		typed = 1
	else:
		typed = typed + 1
print(typed)


import time
(n, c) = (int(i) for i in input().split())
t = [int(i) for i in input().split()]
now = 0
ans = 1
start = time.time()
t = t[::-1]
now = t[0]
for i in t[1:]:
	if now - i > c:
		break
	else:
		ans += 1
	now = i
print(ans)
finish = time.time()


def crazy_computer():
	cases = input().split()
	words = input().split()
	output = 1
	for i in range(1, len(words)):
		if int(words[i]) - int(words[i - 1]) > int(cases[1]):
			output = 1
		else:
			output += 1
	print(output)
	return
crazy_computer()


a = input() + ' '
q = ''
p = []
for i in range(len(a)):
	if a[i] == ' ':
		if q != '':
			p.append(int(q))
		q = ''
	else:
		q = q + a[i]
d = input() + ' '
l = []
q = ''
for i in range(len(d)):
	if d[i] == ' ':
		l.append(int(q))
		q = ''
	else:
		q = q + d[i]
w = 1
for i in range(1, len(l)):
	if l[i] - l[i - 1] > p[1]:
		w = 1
	else:
		w += 1
print(w)


def max1(a):
	p = a[0]
	for x in a:
		if x > p:
			p = x
	return p

def preobr(x):
	if x % 2 == 1:
		return x + 1
	else:
		return x - 1

def prlist(a):
	for x in a:
		print(x, end=' ')

def dlin(n):
	k = 0
	while n > 0:
		n -= k
		k += 1
	return k - 1

def foundm(x, a):
	for i in range(len(a)):
		if x == a[i]:
			return i
	return -1

def fakt(n):
	p = 1
	for i in range(1, n + 1):
		p *= i
	return p
(n, c) = list(map(int, input().split()))
a = list(map(int, input().split()))
a.append(a[n - 1])
k = 0
for i in range(1, n + 1):
	if a[i] - a[i - 1] <= c:
		k += 1
	else:
		k = 0
print(k)


(n, c) = map(int, input().split())
a = list(map(int, input().split()))[::-1]
result = 1
for i in range(len(a) - 1):
	if a[i] - a[i + 1] <= c:
		result += 1
	else:
		break
print(result)


(n, c) = list(map(int, input().split()))
inp = list(map(int, input().split()))
cntr = 0
for i in range(n - 1):
	if inp[i + 1] - inp[i] > c:
		cntr = 0
	else:
		cntr += 1
print(cntr + 1)


n = list(map(int, input().split()))
l = list(map(int, input().split()))
a = n[1]
count = 1
for i in range(len(l)):
	if i != len(l) - 1 and l[i + 1] - l[i] <= a:
		count += 1
	elif i != len(l) - 1 and l[i + 1] - l[i] > a:
		count = 1
	else:
		break
print(count)


lt = input().split()
ls = [int(i) for i in input().split()]
num = int(lt[0])
c = int(lt[1])
t = 1
for i in range(num - 1):
	if ls[i + 1] - ls[i] <= c:
		t += 1
	else:
		t = 1
print(t)


line_1 = input().split()
wordsTyped = int(line_1[0])
c = int(line_1[1])
line_2 = input().split()
timeList = []
for item in line_2:
	timeList.append(int(item))
if wordsTyped > 0:
	wordCount = 1
else:
	wordCount = 0
i = 0
while i in range(len(timeList) - 1):
	if timeList[i + 1] - timeList[i] <= c:
		wordCount += 1
		i += 1
	else:
		wordCount = 1
		i += 1
print(wordCount)


(n, c) = map(int, input().split())
t = 0
b = 0
cnt = 0
for i in map(int, input().split()):
	if i - t > c:
		cnt = 1
	else:
		cnt += 1
	t = i
	b = max(b, cnt)
print(cnt)


(n, t) = map(int, input().split())
time = input().split()
count = 1
i = 0
for i in range(int(n - 1)):
	if int(time[i + 1]) - int(time[i]) <= t:
		count += 1
	else:
		count = 1
print(count)


from math import *
(n, c) = map(int, input().split())
l = list(map(int, input().split()))
k = 1
for i in range(n - 1, 0, -1):
	if l[i] - l[i - 1] > c:
		k = 0
		break
if k == 0:
	print(n - i)
else:
	print(n)


import logging
import copy
import sys
logging.basicConfig(stream=sys.stderr, level=logging.DEBUG)

def solve(firstLine, inputLines):
	c = firstLine[1]
	count = 0
	prevTime = 0
	if len(inputLines) < 2:
		return len(inputLines)
	prevTime = inputLines[0]
	for i in range(0, len(inputLines)):
		t = inputLines[i]
		if t - prevTime > c:
			count = 0
		count += 1
		prevTime = inputLines[i]
	return count

def main():
	firstLine = input().split()
	firstLine = list(map(int, firstLine))
	line = input().split()
	line = list(map(int, line))
	print(solve(firstLine, line))

def log(*message):
	logging.debug(message)
main()


import math
from collections import *
import sys
from functools import reduce

def get_ints():
	return map(int, input().strip().split())

def get_list():
	return list(get_ints())

def get_string():
	return list(input().strip().split())

def printxsp(*args):
	return print(*args, end='')

def printsp(*args):
	return print(*args, end=' ')
UGLYMOD = int(1000000000.0) + 7
SEXYMOD = 998244353
MAXN = int(100000.0)
(n, k) = get_ints()
li = get_list()
last = li[0]
ans = 1
for i in range(1, n):
	if li[i] - last > k:
		ans = 1
	else:
		ans += 1
	last = li[i]
print(ans)


(n, c) = list(map(int, input().split()))
nmbs = list(map(int, input().split()))
slovs = 0
for i in range(n - 1):
	if max(nmbs[i], nmbs[i + 1]) - min(nmbs[i], nmbs[i + 1]) <= c:
		slovs = slovs + 1
	else:
		slovs = 0
print(slovs + 1)


(a, b) = map(int, input().split())
s = input()
l = s.split()
l = list(map(int, l))
z = 0
r = []
for i in l[1:]:
	if i - l[z] > b:
		r.clear()
	else:
		r.append(i)
	z += 1
print(len(r) + 1)


(a, b) = map(int, input().split())
c = list(map(int, input().split()))
x = int(1)
k = int(0)
while x < a:
	if c[x] - c[x - 1] <= b:
		k = k + 1
	else:
		k = 0
	x = x + 1
print(k + 1)


(a, b) = map(int, input().split())
l = list(map(int, input().split()))
l.sort(reverse=True)
s = 0
for i in range(a - 1):
	if l[i] - l[i + 1] > b:
		print(i + 1)
		break
	else:
		s += 1
if s == a - 1:
	print(a)


def Computer():
	(n, c) = list(map(int, input().split()))
	t = list(map(int, input().split()))
	t.reverse()
	for j in range(1, n):
		if t[j - 1] - t[j] > c:
			print(j)
			return
	print(n)
Computer()


(n, c) = map(int, input().split(' '))
t = list(map(int, input().split(' ')))
m = 0
ans = 1
if n > 1:
	for i in range(n - 1):
		if t[i + 1] - t[i] > c:
			m = i + 1
	ans = n - m
print(ans)


c = int(input().split()[1])
arr = list(map(int, input().split()))
d = arr[0]
x = 0
for i in arr:
	if i - d > c:
		x = 1
	else:
		x += 1
	d = i
print(x)


(n, c) = list(map(int, input().strip().split()))
l = list(map(int, input().strip().split()))
t = 1
p = l[0]
for i in range(1, n):
	if l[i] - p <= c:
		t += 1
		p = l[i]
	else:
		t = 1
		p = l[i]
print(t)


(n, t) = [int(i) for i in input().split()]
words = [int(i) for i in input().split()]
res = 1
for i in range(1, n):
	if words[i] - words[i - 1] <= t:
		res += 1
	else:
		res = 1
print(str(res))


(n, c) = map(int, input().split())
sec = [int(i) for i in input().split()]
words = 1
current = sec[0]
for i in range(1, n):
	if sec[i] - current <= c:
		words += 1
	else:
		words = 1
	current = sec[i]
print(words)


(a, b) = map(int, input().split())
a = list(map(int, input().split()))
count = 0
flag = True
for i in range(len(a)):
	if a[i] - a[i - 1] <= b:
		count += 1
	else:
		count = 1
print(count)


m = list(map(int, input().split()))
k = list(map(int, input().split()))
t = 1
for i in range(1, m[0]):
	if k[i] - k[i - 1] <= m[1]:
		t += 1
	else:
		t = 1
print(t)


(n, time) = input().split()
n = int(n)
time = int(time)
num_of_words = 1
words = input().split()
for i in range(n - 1):
	if int(words[i + 1]) - int(words[i]) <= time:
		num_of_words += 1
	else:
		num_of_words = 1
print(num_of_words)


(n, c) = list(map(int, input().split()))
t = list(map(int, input().split()))
cont = 0
prev = t[0]
for i in t:
	if cont == 0:
		cont += 1
	elif i - prev > c:
		cont = 1
	else:
		cont += 1
	prev = i
print(cont)


(a, b) = map(int, input().split())
s = [int(x) for x in input().split()]
ans = 1
for i in range(a - 1, 0, -1):
	if s[i] - s[i - 1] > b:
		break
	else:
		ans += 1
print(ans)


n_and_c = input().split()
(n, c) = [int(i) for i in n_and_c]
time = input().split()
time = [int(i) for i in time]
ans = n
for index in range(n - 1, -1, -1):
	if time[index] - time[index - 1] > c:
		ans = n - index
		break
print(ans)


(n, c) = map(int, input().split())
cnt = 0
a = 0
for b in map(int, input().split()):
	if b - a > c:
		cnt = 1
		a = b
	else:
		cnt += 1
		a = b
print(cnt)


(n, c) = input().split()
(n, c) = (int(n), int(c))
ar = []
count = 0
ar = [int(x) for x in input().split()]
for j in range(n - 1, 0, -1):
	if ar[j] - ar[j - 1] > c:
		break
	else:
		count += 1
print(count + 1)


(b, c) = map(int, input().split())
l = list(map(int, input().split()))
ans = 1
for i in range(b - 1, 0, -1):
	if l[i] - l[i - 1] <= c:
		ans += 1
	else:
		break
print(ans)


s1 = input().split()
n = int(s1[0])
c = int(s1[1])
s2 = input().split()
k = 1
for i in range(0, n - 1):
	if int(s2[i + 1]) - int(s2[i]) > c:
		k = 1
	else:
		k += 1
print(k)


(n, m) = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
c = 1
for i in range(1, len(a)):
	if a[i] - a[i - 1] > m:
		c = 1
	else:
		c += 1
print(c)


(n, c) = list(map(int, input().split()))
nlist = list(map(int, input().split()))
pword = 0
words = 0
for w in nlist:
	if w - pword <= c:
		words += 1
	else:
		words = 1
	pword = w
print(words)


(n, c) = [int(x) for x in input().split()]
a = [int(x) for x in input().split()]
count = 1
max = count
for x in range(len(a) - 1):
	if a[x + 1] - a[x] > c:
		count = 1
	else:
		count += 1
print(count)


(n, m) = map(int, input().split())
(a, b) = (0, 0)
for i in map(int, input().split()):
	b = [b + 1, 1][i - a > m]
	a = i
print(b)


from sys import stdin, stdout
words = 1
words_seconds = [int(x) for x in stdin.readline().rstrip().split()]
nums = stdin.readline().rstrip().split()
nums = [int(x) for x in nums]
for i in range(words_seconds[0] - 1):
	if nums[i + 1] - nums[i] > words_seconds[1]:
		words = 1
	else:
		words += 1
stdout.write(str(words))


(n, c) = map(int, input().split())
l = [int(x) for x in input().split()]
if n == 1:
	print(1)
	exit()
p = [l[x] - l[x - 1] for x in range(1, n)]
cn = 0
p = p[::-1]
for x in p:
	if x > c:
		break
	cn += 1
print(cn + 1)


(n, c) = list(map(int, input().split()))
mas = list(map(int, input().split()))
ch = 1
for i in range(len(mas) - 1):
	if mas[i + 1] - mas[i] <= c:
		ch += 1
	else:
		ch = 1
print(ch)


nc = list(map(int, input().split()))
nums = list(map(int, input().split()))
words = 1
for i in range(0, len(nums) - 1):
	if nums[i + 1] - nums[i] > nc[1]:
		words = 1
	else:
		words += 1
print(words)


s = input().split(' ')
t = input().split(' ')
n = int(s[0])
c = int(s[1])
x = 0
for i in range(n):
	t[i] = int(t[i])
for j in range(n - 1):
	if t[j + 1] - t[j] <= c:
		x = x + 1
	else:
		x = 0
print(x + 1)


(n, c) = map(int, input().split())
arr = list(map(int, input().split()))
ans = 1
for (i, j) in enumerate(arr):
	if i >= 1:
		if j - arr[i - 1] > c:
			ans = 1
		else:
			ans += 1
print(ans)


(n, c) = [int(x) for x in input().split()]
ans = 1
time = [int(x) for x in input().split()]
for i in range(0, n - 1):
	if time[i + 1] - time[i] <= c:
		ans += 1
	else:
		ans = 1
print(ans)


(n, c) = map(int, input().split())
arr = list(map(int, input().strip().split()))[0:n]
j = 1
for i in range(0, n - 1):
	if arr[i + 1] - arr[i] <= c:
		j += 1
	elif arr[i + 1] - arr[i] >= c:
		j = 1
print(j)


(n, c) = input().split()
c = int(c)
t = input().split()
world_count = 1
j = 0
for i in t:
	if j > 0:
		if int(i) - int(t[j - 1]) > c:
			world_count = 1
		else:
			world_count += 1
	j += 1
print(world_count)


[n, c] = [int(x) for x in input().split()]
L = [int(x) for x in input().split()]
w = 0
for i in range(len(L) - 1):
	if abs(L[i] - L[i + 1]) <= c:
		w += 1
	else:
		w = 0
print(w + 1)