You are given a problemset consisting of $n$ problems. The difficulty of the $i$-th problem is $a_i$. It is guaranteed that all difficulties are distinct and are given in the increasing order.

You have to assemble the contest which consists of some problems of the given problemset. In other words, the contest you have to assemble should be a subset of problems (not necessary consecutive) of the given problemset. There is only one condition that should be satisfied: for each problem but the hardest one (the problem with the maximum difficulty) there should be a problem with the difficulty greater than the difficulty of this problem but not greater than twice the difficulty of this problem. In other words, let $a_{i_1}, a_{i_2}, \dots, a_{i_p}$ be the difficulties of the selected problems in increasing order. Then for each $j$ from $1$ to $p-1$ $a_{i_{j + 1}} \le a_{i_j} \cdot 2$ should hold. It means that the contest consisting of only one problem is always valid.

Among all contests satisfying the condition above you have to assemble one with the maximum number of problems. Your task is to find this number of problems.


-----Input-----

The first line of the input contains one integer $n$ ($1 \le n \le 2 \cdot 10^5$) — the number of problems in the problemset.

The second line of the input contains $n$ integers $a_1, a_2, \dots, a_n$ ($1 \le a_i \le 10^9$) — difficulties of the problems. It is guaranteed that difficulties of the problems are distinct and are given in the increasing order.


-----Output-----

Print a single integer — maximum number of problems in the contest satisfying the condition in the problem statement.


-----Examples-----
Input
10
1 2 5 6 7 10 21 23 24 49

Output
4

Input
5
2 10 50 110 250

Output
1

Input
6
4 7 12 100 150 199

Output
3



-----Note-----

Description of the first example: there are $10$ valid contests consisting of $1$ problem, $10$ valid contests consisting of $2$ problems ($[1, 2], [5, 6], [5, 7], [5, 10], [6, 7], [6, 10], [7, 10], [21, 23], [21, 24], [23, 24]$), $5$ valid contests consisting of $3$ problems ($[5, 6, 7], [5, 6, 10], [5, 7, 10], [6, 7, 10], [21, 23, 24]$) and a single valid contest consisting of $4$ problems ($[5, 6, 7, 10]$).

In the second example all the valid contests consist of $1$ problem.

In the third example are two contests consisting of $3$ problems: $[4, 7, 12]$ and $[100, 150, 199]$.

Difficulty: EASY

Solutions:
n = int(input())
a = map(int, input().split())
(ans, m, x) = (1, 0, 0)
for i in a:
	if i > 2 * x:
		m = 1
	else:
		m += 1
		ans = max(ans, m)
	x = i
print(ans)


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


def main():
	n = int(input())
	arr = list(map(int, input().split()))
	res = 0
	cnt = 0
	for i in range(1, len(arr)):
		if arr[i] <= 2 * arr[i - 1]:
			cnt += 1
			if i == len(arr) - 1:
				res = max(cnt, res)
				break
		else:
			res = max(cnt, res)
			cnt = 0
	print(res + 1)
main()


n = int(input())
a = input().split()
for i in range(n):
	a[i] = int(a[i])
count = 0
b = []
for j in range(n):
	if j == 0:
		count += 1
		if j == n - 1:
			b.append(count)
	elif a[j] <= 2 * a[j - 1]:
		count += 1
		if j == n - 1:
			b.append(count)
	else:
		b.append(count)
		count = 1
		if j == n - 1:
			b.append(count)
print(max(b))


n = int(input())
a = [int(x) for x in input().split()]
longestsofar = 1
currentrun = 1
index = 0
done = False
while not done:
	while index < len(a) - 1 and a[index] * 2 >= a[index + 1]:
		index += 1
		currentrun += 1
	if index == len(a) - 1:
		print(max(currentrun, longestsofar))
		done = True
	else:
		if currentrun > longestsofar:
			longestsofar = currentrun
		index += 1
		currentrun = 1


n = int(input())
a = list(map(int, input().split()))
s = 0
t = 0
r = 0
for i in range(n):
	if a[i] > t * 2:
		s = 0
	s += 1
	r = max(s, r)
	t = a[i]
print(r)


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


from collections import deque
from sys import stdin
lines = deque((line.strip() for line in stdin.readlines()))

def nextline():
	return lines.popleft()

def types(cast, sep=None):
	return tuple((cast(x) for x in strs(sep=sep)))

def ints(sep=None):
	return types(int, sep=sep)

def strs(sep=None):
	return tuple(nextline()) if sep == '' else tuple(nextline().split(sep=sep))

def main():
	n = int(nextline())
	nums = ints()
	largest_group = 0
	last_num = nums[0]
	curr_group = 1
	for i in range(1, n):
		if nums[i] > 2 * last_num:
			largest_group = max(largest_group, curr_group)
			curr_group = 1
		else:
			curr_group += 1
		last_num = nums[i]
	print(max(largest_group, curr_group))
main()


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


n = int(input())
Limit = 2000000002
a = list(map(int, input().split())) + [Limit]
maxnum = 1
lasti = 0
for i in range(1, n + 1):
	if a[i] > a[i - 1] * 2:
		maxnum = max(maxnum, i - lasti)
		lasti = i
print(maxnum)


n = input()
l = list(map(int, input().split()))
z = []
for i in range(len(l) - 1):
	if l[i] * 2 >= l[i + 1]:
		z.append(1)
	else:
		if l[i - 1] * 2 >= l[i]:
			z.append(1)
		z.append(-1)
z.append(1)
cnt = 0
maxx = 0
for i in z:
	if i == 1:
		cnt += 1
	else:
		maxx = max(maxx, cnt)
		cnt = 0
maxx = max(maxx, cnt)
print(maxx)


n = int(input())
arr = list(map(int, input().split()))
i = maxi = 0
while i < n:
	j = i
	while j + 1 < n and 2 * arr[j] >= arr[j + 1]:
		j += 1
	maxi = max(maxi, j - i + 1)
	i = j + 1
print(maxi)


def solve(n, a):
	(maxnum, cnt) = (1, 1)
	for i in range(1, n):
		if 2 * a[i - 1] >= a[i]:
			cnt += 1
		else:
			maxnum = max(maxnum, cnt)
			cnt = 1
	maxnum = max(maxnum, cnt)
	return maxnum
n = int(input())
a = list(map(int, input().split()))
ans = solve(n, a)
print(ans)


a = int(input())
b = input().split()
for i in range(a):
	b[i] = int(b[i])
arr = [1]
i = 0
temp = 1
while i < a - 1:
	if b[i] * 2 < b[i + 1]:
		arr.append(temp)
		temp = 1
		i += 1
		continue
	for j in range(i + 1, a):
		if b[i] * 2 >= b[j]:
			temp += 1
			i = j
		if i >= a - 1:
			arr.append(temp)
print(max(arr))


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


n = int(input())
a = list(map(int, input().split()))
longest = 0
maxlongest = 0
for i in range(0, n - 1):
	if a[i + 1] <= 2 * a[i]:
		longest += 1
	else:
		maxlongest = max(maxlongest, longest)
		longest = 0
maxlongest = max(maxlongest, longest)
print(maxlongest + 1)


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


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


n = int(input())
v = [int(i) for i in input().split(' ')]
dp = [1 for _ in range(n)]
for i in range(1, n):
	dp[i] = dp[i - 1] + 1 if v[i] <= v[i - 1] * 2 else 1
print(max(dp))


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


n = int(input())
s = [int(i) for i in input().split()]
x = [i for i in range(len(s))]
i = 0
j = 0
while i < len(s) - 1:
	j = i + 1
	while j < len(s):
		if s[j] <= 2 * s[i]:
			x[i] = j
			j += 1
		else:
			break
	if j == i + 1:
		i = j
	else:
		i = j - 1
max = 1
for i in range(len(s)):
	if x[i] != i:
		j = i
		count = 1
		while x[j] != j:
			count += x[j] - j
			j = x[j]
		if max < count:
			max = count
print(max)


n = int(input())
a = list(map(int, input().split()))
i = 0
max = 1
while i < n - 1:
	count = 1
	while i < n - 1 and a[i + 1] <= 2 * a[i]:
		count += 1
		i += 1
	if max < count:
		max = count
	i += 1
print(max)


import sys

def fi():
	return sys.stdin.readline()
n = int(fi())
l = list(map(int, fi().split()))
prev = l[0]
c = 1
max1 = 0
for i in range(1, n):
	if l[i] <= 2 * prev:
		c += 1
		prev = l[i]
	else:
		prev = l[i]
		c = 1
	max1 = max(c, max1)
max1 = max(max1, c)
print(max1)


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


from sys import stdin, stdout
n = int(stdin.readline())
diff = list(map(int, stdin.readline().split()))
mx = 1
c = 1
for i in range(1, n):
	if 2 * diff[i - 1] < diff[i]:
		mx = max(mx, c)
		c = 1
	else:
		c += 1
mx = max(mx, c)
stdout.write(str(mx))


n = int(input())
p = list([int(i) for i in input().split()])
ans = list([1 for i in range(n)])
ans[0] = 1
for i in range(1, n):
	h = p[i] / 2
	if p[i - 1] >= h:
		ans[i] = ans[i - 1] + 1
print(max(ans))


def solve(a):
	n = len(a)
	c = 0
	res = 0
	for i in range(1, n):
		if a[i] <= a[i - 1] * 2:
			c += 1
		else:
			res = max(res, c)
			c = 0
	res = max(res, c)
	print(res + 1)
n = int(input())
a = [int(i) for i in input().split()]
solve(a)


n = int(input())
li = list(map(int, input().split(' ')))
i = 0
count = 1
max = 1
while i < n - 1:
	if li[i] * 2 >= li[i + 1]:
		count += 1
	else:
		count = 1
	if count > max:
		max = count
	i += 1
print(max)


n = int(input())
array = list(map(int, input().split()))
temp = 1
maxi = 1
for i in range(n - 1):
	if array[i] * 2 >= array[i + 1]:
		temp += 1
		if temp > maxi:
			maxi = temp
	else:
		temp = 1
if temp > maxi:
	maxi = temp
print(maxi)


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


n = int(input())
sl = list(map(int, input().split()))
t1 = 1
t2 = 0
last = sl[0]
for i in range(1, n):
	if sl[i] >= sl[i - 1] and sl[i] <= 2 * last:
		t1 += 1
		last = sl[i]
	else:
		t2 = max(t2, t1)
		t1 = 1
		last = sl[i]
t2 = max(t1, t2)
print(t2)


n = int(input())
arr = [int(p) for p in input().split()]
j = 1
currMax = 1
for x in range(1, n):
	if arr[x] <= 2 * arr[x - 1]:
		j += 1
	else:
		j = 1
	currMax = max(currMax, j)
print(currMax)


def creator(n, arr):
	count = 0
	saved = 0
	for x in range(0, n - 1):
		if arr[x] * 2 >= arr[x + 1]:
			count += 1
		else:
			if count > saved:
				saved = count
			count = 0
	return max(saved + 1, count + 1)
n = int(input())
arr = list(map(int, input().split()))
print(creator(n, arr))


n = int(input())
s = input()
arr = s.split(' ')
f = 0
nmax = 1
for i in range(n):
	if int(arr[i]) <= int(arr[i - 1]) * 2:
		f += 1
		if f > nmax:
			nmax = f
	else:
		f = 1
print(nmax)


n = int(input())
(a, t) = ([int(x) for x in input().split()], [])
for i in range(n - 1):
	if 2 * a[i] >= a[i + 1]:
		t.append(1)
	else:
		t.append(0)

def do_stuff(t):
	(ans, count) = (0, 0)
	for i in t:
		if i == 1:
			count += 1
		else:
			ans = max(ans, count)
			count = 0
	ans = max(ans, count)
	return ans
print(do_stuff(t) + 1)


n = int(input())
s = list(map(int, input().split()))
r = 1
m = 1
for i in range(1, len(s)):
	if s[i] / s[i - 1] <= 2:
		r += 1
	else:
		m = max(m, r)
		r = 1
print(max(m, r))


(_, ls, a, c) = (int(input()), [], 0, 1)
for x in map(int, input().split()):
	if x <= a * 2:
		c += 1
	else:
		ls.append(c)
		c = 1
	a = x
ls.append(c)
print(max(ls))


n = int(input())
a = [int(x) for x in input().split()]
l = 1
max_l = 1
for i in range(n - 1):
	if a[i + 1] > a[i] * 2:
		l = 1
	else:
		l += 1
		max_l = max(max_l, l)
print(max_l)


n = int(input())
a = list(map(int, input().split()))
maxi = 1
i = 0
while i < len(a) - maxi:
	tek = 1
	j = i + 1
	while j < len(a) and a[j] <= 2 * a[j - 1]:
		j += 1
		tek += 1
	if tek > maxi:
		maxi = tek
	i += tek
print(maxi)


n = int(input())
s = input().split()
l = [int(s[i]) for i in range(n)]
res = 1
cnt = 1
now = l[0]
for i in range(1, n):
	if now * 2 >= l[i]:
		now = l[i]
		cnt += 1
	else:
		now = l[i]
		res = max(res, cnt)
		cnt = 1
res = max(res, cnt)
print(res)


def getMaxLength(arr, n):
	count = 0
	result = 0
	for i in range(0, n):
		if arr[i] == 0:
			count = 0
		else:
			count += 1
			result = max(result, count)
	return result
n = int(input())
prob = [int(x) for x in input().split()]
yesno = []
for i in range(n - 1):
	if prob[n - i - 1] <= 2 * prob[n - i - 2]:
		yesno.append(1)
	else:
		yesno.append(0)
yesno.append(0)
a = getMaxLength(yesno, len(yesno))
print(a + 1)


n = int(input())
x = input()
x = x.split()
for i in range(0, len(x)):
	x[i] = int(x[i])
ans = 1
sum = 1
last = x[0]
for i in range(1, len(x)):
	if last * 2 >= x[i]:
		last = x[i]
		sum = sum + 1
	else:
		last = x[i]
		sum = 1
	ans = max(ans, sum)
print(ans)


n = int(input())
d = 1
m = 1
H = list(map(int, input().split()))
G = H[::-1]
i = 0
while i < n - 1:
	if H[i] * 2 >= H[i + 1]:
		d += 1
	else:
		if d > m:
			m = d
		d = 1
	i += 1
if d > m:
	m = d
print(m)


n = int(input())
arr = list(map(int, input().split()))

def find(arr, i, last, x):
	while last < len(arr) and arr[last] <= 2 * x:
		last += 1
	return last - 1
mx = 0
last = 0
b = [0 for i in range(n - 1)]
for i in range(n - 1):
	if arr[i + 1] <= 2 * arr[i]:
		b[i] = 1
i = 0
mx = 1
while i < len(b):
	prev_i = i
	if b[i] == 1:
		while i < len(b) and b[i] == 1:
			i += 1
		mx = max(mx, i - prev_i + 1)
	else:
		i += 1
print(mx if n > 1 else 1)


n = int(input())
a = list(map(int, input().split()))
i = 0
ms = 1
curr = 1
for i in range(n - 1):
	if 2 * a[i] >= a[i + 1]:
		curr = curr + 1
	else:
		ms = max(curr, ms)
		curr = 1
ms = max(curr, ms)
print(ms)


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


import os, sys

def get_ints():
	return map(int, sys.stdin.readline().split())
n = int(input())
ar = list(get_ints())
ans = 0
cnt = 1
for i in range(n - 1):
	if 2 * ar[i] >= ar[i + 1]:
		cnt += 1
	else:
		ans = max(cnt, ans)
		cnt = 1
print(max(cnt, ans))


n = int(input().strip())
arr = list(map(int, input().strip().split()))
m = 1
lm = 1
for i in range(len(arr) - 1):
	if 2 * arr[i] >= arr[i + 1]:
		lm += 1
	else:
		if lm > m:
			m = lm
		lm = 1
if lm > m:
	m = lm
print(m)


from sys import stdin
a = int(stdin.readline())
A = stdin.readline().split()
count = 1
MAX = 0
for k in range(0, a):
	if a == 1:
		MAX = 1
	if k == a - 1:
		break
	if int(A[k + 1]) <= 2 * int(A[k]):
		count += 1
	else:
		count = 1
	if count > MAX:
		MAX = count
print(MAX)


n = int(input())
l = list(map(int, input().split()))
if n == 1:
	print(1)
else:
	t = []
	ans = 1
	for i in range(n - 1):
		if l[i] * 2 >= l[i + 1]:
			ans += 1
		else:
			t.append(ans)
			if i == n - 2:
				t.append(1)
			ans = 1
		if i == n - 2 and l[i] * 2 >= l[i + 1]:
			t.append(ans)
	print(max(t))


input()
(prev, k, m) = (0, 1, 1)
for a in map(int, input().split()):
	if a > 2 * prev:
		(k, m) = (0, max(k, m))
	(prev, k) = (a, k + 1)
print(max(k, m))


n = int(input())
arr = [int(c) for c in input().split(' ')]
i = n - 1
best = 1
temp = 1
while i > 0:
	if arr[i] <= arr[i - 1] * 2:
		i -= 1
		temp += 1
	else:
		i -= 1
		if temp > best:
			best = temp
		temp = 1
if temp > best:
	best = temp
print(best)


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


length = int(input())
a = []
a = str(input()).split()
maxi = 1
count = 1
a = [*map(int, a)]
for i in range(length - 1):
	if a[i + 1] <= a[i] * 2:
		count += 1
	else:
		maxi = max(count, maxi)
		count = 1
maxi = max(count, maxi)
print(maxi)


n = int(input())
l = input().split(' ')
arr = [int(x) for x in l]
ans = 1
cnt = 0
for i in range(len(arr) - 1):
	if arr[i] * 2 >= arr[i + 1]:
		cnt += 1
		ans = max(ans, cnt + 1)
	else:
		cnt = 0
print(ans)


def find_ans(s, n):
	ans = 0
	q = 1
	for i in range(1, n):
		if 2 * s[i - 1] >= s[i]:
			q += 1
		else:
			ans = max(q, ans)
			q = 1
	return max(ans, q)
n = int(input())
s = list(map(int, input().split()))
print(find_ans(s, n))


import re
import sys
exit = sys.exit
from bisect import bisect_left as bsl, bisect_right as bsr
from collections import Counter, defaultdict as ddict, deque
from functools import lru_cache
cache = lru_cache(None)
from heapq import *
from itertools import *
from math import inf
from pprint import pprint as pp
enum = enumerate
ri = lambda : int(rln())
ris = lambda : list(map(int, rfs()))
rln = sys.stdin.readline
rl = lambda : rln().rstrip('\n')
rfs = lambda : rln().split()
mod = 1000000007
d4 = [(0, -1), (1, 0), (0, 1), (-1, 0)]
d8 = [(-1, -1), (0, -1), (1, -1), (-1, 0), (1, 0), (-1, 1), (0, 1), (1, 1)]
n = ri()
a = ris()
ans = cnt = 1
for i in range(1, n):
	if 2 * a[i - 1] < a[i]:
		cnt = 0
	cnt += 1
	ans = max(ans, cnt)
print(ans)


n = int(input())
ls = list(map(int, input().split()))
ans = 1
i = j = 0
while j < n - 1 and i <= j:
	temp = 1
	while j < n - 1 and 2 * ls[j] >= ls[j + 1]:
		j += 1
		temp += 1
	if i == j:
		i += 1
		j += 1
	else:
		i = j
	if temp > ans:
		ans = temp
print(ans)


n = int(input())
L = list(map(int, input().split()))
(c, ma) = (1, 1)
(i, j) = (0, 0)
while i < n:
	j = i + 1
	c = 1
	while j < n and L[j] <= 2 * L[i]:
		c += 1
		i += 1
		j += 1
	if c > ma:
		ma = c
	i = i + 1
print(ma)


n = input()
array = input().split()
fin = []
for i in array:
	fin.append(int(i))
i = 0
sums = 0
maxm = 0
while i < len(fin) - 1:
	if fin[i + 1] <= fin[i] * 2:
		sums += 1
	else:
		sums = 0
	if sums > maxm:
		maxm = sums
	i += 1
print(maxm + 1)


n = int(input())
list1 = [int(x) for x in input().split()]
answers = []
i = 0
while i < n - 1:
	counter = 0
	for j in range(i, n - 1):
		if list1[j] * 2 >= list1[j + 1] and list1[j] * 2 <= list1[j + 1] * 2:
			counter += 1
		else:
			break
	i = j + 1
	answers.append(counter)
if n == 1:
	print(1)
else:
	print(max(answers) + 1)


import sys
a = int(sys.stdin.readline())
b = list(map(int, sys.stdin.readline().split()))
k = [False] * (a - 1)
for i in range(len(k)):
	if b[i + 1] <= 2 * b[i]:
		k[i] = True
max_rr = -1
prv = []
rr = 0
prev = False
for bol in k:
	if prev and bol:
		rr += 1
		prev = bol
	else:
		prev = bol
		max_rr = max(max_rr, rr)
		if bol:
			rr = 1
		else:
			rr = 0
else:
	max_rr = max(max_rr, rr)
print(max_rr + 1)


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


n = int(input())
a = [0] * n
a = list(map(int, input().split()))
max = 1
length = 1
t = a[0]
for i in range(1, n):
	if a[i] <= 2 * t:
		t = a[i]
		length += 1
	else:
		t = a[i]
		length = 1
	if length > max:
		max = length
print(max)


import math
n = int(input())
arr = input()
arr = arr.split(' ')
for i in range(0, len(arr)):
	arr[i] = int(arr[i])
cur = arr[0]
count = 0
max = -math.inf
for i in range(0, len(arr) - 1):
	if arr[i + 1] <= 2 * arr[i]:
		count += 1
	else:
		count += 1
		if count > max:
			max = count
		count = 0
count += 1
if count > max:
	max = count
print(max)


n = int(input())
lis = list(map(int, input().split()))
maxi = 1
cur = 1
for i in range(1, n):
	if lis[i] <= lis[i - 1] * 2:
		cur += 1
	else:
		maxi = max(maxi, cur)
		cur = 1
print(max(maxi, cur))


n = int(input())
lst = list(map(int, input().split()))
(i, l, ml) = (1, 1, 1)
while i < len(lst):
	if lst[i - 1] * 2 >= lst[i]:
		l += 1
		if ml < l:
			ml = l
	else:
		l = 1
	i += 1
print(ml)


n = int(input())
dp = [1 for _ in range(n)]
nums = [int(x) for x in input().split()]
best = 1
for i in range(1, n):
	if 2 * nums[i - 1] >= nums[i]:
		dp[i] = max(dp[i], dp[i - 1] + 1)
		best = max(best, dp[i])
print(best)


from bisect import bisect_left
(n, l) = (int(input()), list(map(int, input().split())))
(m, curr) = (1, 1)
for i in range(1, n):
	if l[i] <= l[i - 1] * 2:
		curr += 1
	else:
		curr = 1
	m = max(m, curr)
print(m)


n = int(input())
vals = input().split()
a = [int(val) for val in vals]
dp = [1] * n
for i in range(1, n):
	if a[i] <= a[i - 1] * 2:
		dp[i] = dp[i - 1] + 1
print(max(dp))


n = int(input())
a = list(map(int, input().split()))
x = [0]
for i in range(1, n):
	if a[i - 1] * 2 < a[i]:
		x.append(i)
x.append(n)
ans = 0
m = len(x)
for i in range(1, m):
	ans = max(ans, x[i] - x[i - 1])
print(ans)


n = int(input())
number = list(input().split())
res = []
if n == 1:
	print(1)
else:
	for i in range(0, n - 1):
		item2 = int(number[i]) * 2
		if item2 < int(number[i + 1]):
			res.append(i)
	res.append(n - 1)
	end = [res[0] + 1]
	if len(res) == 1:
		print(n)
	else:
		for j in range(1, len(res)):
			cha = res[j] - res[j - 1]
			end.append(cha)
		print(sorted(end)[len(end) - 1])


n = int(input())
a = [int(s) for s in input().split()]
ans = 1
i = 0
if n == 1:
	print(ans)
else:
	while i < n - 1:
		j = i
		while j < n - 1 and a[j + 1] <= a[j] << 1:
			j += 1
		ans = max(j - i + 1, ans)
		i = j + 1
	print(ans)


n = int(input())
A = [int(x) for x in input().split()]
ans = 0
cur = 1
for (p, a) in zip(A[:-1], A[1:]):
	if a <= p * 2:
		cur += 1
	else:
		ans = max(ans, cur)
		cur = 1
ans = max(ans, cur)
print(ans)


n = int(input())
a = list(map(int, input().split(' ')))
cands = []
cnt = 0
for i in range(n - 1):
	if a[i + 1] <= 2 * a[i]:
		cnt += 1
	else:
		cands.append(cnt + 1)
		cnt = 0
cands.append(cnt + 1)
print(max(cands))


n = int(input())
problems = list(map(int, input().split(' ')))
longest = 1
curr = 1
prev = problems[0]
for i in range(1, n):
	if problems[i] <= 2 * prev:
		curr += 1
	else:
		if curr > longest:
			longest = curr
		curr = 1
	prev = problems[i]
if curr > longest:
	longest = curr
print(longest)


n = int(input())
a = [int(x) for x in input().split()]
cur_len = 1
max_len = 1
for i in range(1, len(a)):
	if a[i] <= 2 * a[i - 1]:
		cur_len += 1
	else:
		if cur_len > max_len:
			max_len = cur_len
		cur_len = 1
if cur_len > max_len:
	max_len = cur_len
print(max_len)


n = int(input())
a = list(map(int, input().split()))
m = 1
mi = 0
for i in range(1, n):
	if a[i] >= a[i - 1] and a[i] <= 2 * a[0]:
		m += 1
		a[0] = a[i]
	else:
		mi = max(m, mi)
		m = 1
		a[0] = a[i]
mi = max(m, mi)
print(mi)


def test_2():
	import math
	from collections import Counter
	n = list(map(int, input().split(' ')))[0]
	m = list(map(int, input().split(' ')))
	a = 0
	b = 0
	for i in range(n - 1):
		if m[i + 1] <= int(m[i] * 2):
			a += 1
		else:
			b = max(b, a + 1)
			a = 0
	b = max(b, a + 1)
	print(b)
test_2()


n = int(input())
li = [int(i) for i in input().split(' ')]
ans = 1
m = 1
x = li[0]
for i in range(1, n):
	if li[i] <= 2 * x and li[i] > x:
		m += 1
	else:
		m = 1
	ans = max(ans, m)
	x = li[i]
print(ans)


n = int(input())
arr = list(map(int, input().split()))[::-1]
markings = [0 for i in range(n)]
for i in range(n):
	if markings[i] == 0:
		markings[i] += 1
		curr = 1
		for j in range(i, n - 1):
			if markings[j + 1] != 0:
				curr += 1
			elif arr[j] <= 2 * arr[j + 1]:
				curr += 1
				markings[j + 1] = curr
			else:
				break
print(max(markings))


n = int(input())
mas = list(map(int, input().split()))
(res, y, z) = (1, mas[0], 1)
for (i, x) in enumerate(mas):
	if i != 0:
		if x > y and x <= 2 * y:
			z += 1
			y = x
		else:
			if res < z:
				res = z
			(z, y) = (1, x)
if res < z:
	res = z
print(res)


n = int(input())
p = r = 0
c = 0
for a in map(int, input().split()):
	if a > p * 2:
		c = 1
	else:
		c += 1
	r = max(r, c)
	p = a
print(r)


from math import *
from collections import *
from itertools import *
from bisect import *
from operator import *
import sys
sys.setrecursionlimit(1000000)

def io():
	return map(int, input().split())

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

def o():
	return int(input())

def kl(con, x=0):
	if x == 0:
		print('Yes') if con else print('No')
	elif x == 1:
		print('yes') if con else print('no')
	elif x == 2:
		print('YES') if con else print('NO')
p = input
n = o()
l = op()
(i, j) = (0, 1)
m = 1
c = 1
fg = 1
for i in range(1, n):
	if l[i] <= 2 * l[i - 1]:
		fg = 1
		c += 1
	else:
		m = max(m, c)
		c = 1
		fg = 0
if fg == 1:
	m = max(m, c)
print(m)


n = int(input())
a = [int(i) for i in input().split(' ')]
best = 1
cur = 1
for i in range(1, n):
	if a[i] <= a[i - 1] * 2:
		cur += 1
	else:
		cur = 1
	best = max(best, cur)
print(best)


from math import *
n = int(input())
m = list(map(int, input().split()))
p = m[0] * 2
ans = 0
s = 1
for i in range(1, n):
	if m[i] <= p:
		s += 1
		p = m[i] * 2
	else:
		if s > ans:
			ans = s
		s = 1
		p = m[i] * 2
print(max(ans, s))


def main():
	n = int(input())
	arr = list(map(int, input().split()))
	calcContest(n, arr)

def calcContest(n, arr):
	maxlen = 1
	stack = [arr[0]]
	for i in range(1, n):
		if arr[i - 1] * 2 >= arr[i]:
			stack.append(arr[i])
		else:
			maxlen = max(maxlen, len(stack))
			stack.clear()
			stack.append(arr[i])
	maxlen = max(maxlen, len(stack))
	print(maxlen)
main()


n = int(input())
l = list(map(int, input().split()))
(ans, cur) = (0, 1)
for i in range(n):
	if i:
		if l[i] <= 2 * l[i - 1]:
			cur += 1
		else:
			cur = 1
	ans = max(ans, cur)
print(ans)


n = int(input())
lenz = [1]
arr = [int(i) for i in input().strip().split(' ')]
count = 1
for i in range(n - 1):
	if 2 * arr[i] >= arr[i + 1]:
		count = count + 1
	else:
		lenz.append(count)
		count = 1
print(max(max(lenz), count))


n = int(input())
a = list(map(int, input().split()))
count = 0
temp = 1
for j in range(0, n - 1):
	if a[j + 1] <= 2 * a[j]:
		temp += 1
	else:
		if temp > count:
			count = temp
		temp = 1
if temp > count:
	count = temp
print(count)


n = int(input())
A = list(map(int, input().split()))
ans = 1
curr = 1
for i in range(n - 1):
	if 2 * A[i] >= A[i + 1]:
		curr += 1
	else:
		ans = max(curr, ans)
		curr = 1
ans = max(ans, curr)
print(ans)


import sys
mod = 10 ** 9 + 7
INF = float('inf')

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

def inpl():
	return list(map(int, sys.stdin.readline().split()))
n = inp()
a = inpl()
res = 0
cnt = 1
for i in range(n - 1):
	if a[i] * 2 >= a[i + 1]:
		cnt += 1
	else:
		res = max(res, cnt)
		cnt = 1
print(max(res, cnt))


n = int(input())
A = list(map(int, input().split()))
B = []
lol = 1
if n == 1:
	B.append(1)
for i in range(n - 1):
	if 2 * A[i] >= A[i + 1]:
		lol += 1
		if i == n - 2:
			B.append(lol)
	else:
		B.append(lol)
		lol = 1
print(max(B))


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


n = int(input())
a = list(map(int, input().split()))
b = [1]
maxx = 0
c = 0
for i in range(1, n):
	if a[i] <= a[i - 1] * 2:
		b.append(1)
	else:
		b.append(0)
		b.append(1)
for e in b:
	if e == 1:
		c += 1
	else:
		maxx = max(maxx, c)
		c = 0
maxx = max(maxx, c)
print(maxx)


n = int(input())
a = list(map(int, input().split()))
maxn = 0
last = 0
if n == 1:
	print(1)
	exit()
for i in range(n - 1):
	if a[i + 1] > a[i] * 2:
		maxn = max(maxn, i - last + 1)
		last = i + 1
	if i == n - 2 and a[i + 1] <= a[i] * 2:
		maxn = max(maxn, i - last + 2)
print(maxn)


n = int(input())
a = input()
a = a.split()
maxx = 0
xs = 0
if n > 1:
	for i in range(n):
		xs += 1
		if n - 1 > i:
			if int(a[i]) * 2 < int(a[i + 1]):
				if maxx < xs:
					maxx = xs
				xs = 0
if xs > maxx:
	maxx = xs
if maxx > 0:
	print(maxx)
else:
	print(1)


n = input()
n = int(n)
t = list(map(int, input().split(' ')[:n]))
ck = [0] * n
for i in range(0, n - 1):
	if t[i + 1] <= 2 * t[i]:
		ck[i] = 1
tmp = 1
res = 1
for i in range(0, n - 1):
	if ck[i] == 1:
		tmp = tmp + 1
		if tmp > res:
			res = tmp
	else:
		tmp = 1
print(res)


n = int(input())
a = [int(x) for x in input().split()]
b = []
k = 0
x = 0
for i in range(n):
	if i == 0:
		k += 1
		x = a[i] * 2
	elif a[i] <= x:
		k += 1
		x = a[i] * 2
	else:
		b.append(k)
		k = 1
		x = a[i] * 2
b.append(k)
i_max = -1
for y in b:
	if y > i_max:
		i_max = y
print(i_max)


num_problems = int(input())
problems = list(map(int, input().split()))
max_solution = 1
solution = 1
for pos in range(num_problems - 1):
	if problems[pos + 1] <= problems[pos] << 1:
		solution += 1
	else:
		max_solution = max(max_solution, solution)
		solution = 1
max_solution = max(max_solution, solution)
print(max_solution)


n = int(input())
l = list(map(int, input().split()))
st = []
cnt = 0
mx = 0
for i in l:
	while st and st[-1] * 2 < i:
		st.pop()
		cnt -= 1
	st.append(i)
	cnt += 1
	mx = max(mx, cnt)
print(mx)


n = int(input())
a = list(map(int, input().split()))
a = sorted(a)
num = 1
rec = 1
pre = a[0]
for i in range(1, n):
	if a[i] <= pre * 2:
		rec += 1
		pre = a[i]
	else:
		num = max(rec, num)
		rec = 1
		pre = a[i]
	num = max(rec, num)
print(num)


n = int(input())
a = list(map(int, input().split()))
y = 1
mx = 1
sm = 1
while y < len(a):
	if a[y] <= a[y - 1] * 2:
		sm += 1
	else:
		mx = max(mx, sm)
		sm = 1
	y += 1
mx = max(mx, sm)
print(mx)


from sys import stdin, stdout
n = int(stdin.readline())
a = [int(x) for x in stdin.readline().split()]
ans = 0
cur = 0
pre = 0
for i in a:
	if i > pre * 2:
		ans = max(ans, cur)
		cur = 1
	else:
		cur += 1
	pre = i
stdout.write(str(max(ans, cur)) + '\n')


n = int(input())
a = list(map(int, input().split()))
M = 1
E = 1
for i in range(1, n):
	if a[i] <= 2 * a[i - 1]:
		E += 1
		M = max(M, E)
	else:
		E = 1
print(M)


import math as mt
import sys, string, bisect
input = sys.stdin.readline
from collections import deque, defaultdict
L = lambda : list(map(int, input().split()))
Ls = lambda : list(input().split())
M = lambda : map(int, input().split())
I = lambda : int(input())
n = I()
l = L()
d = []
for i in range(1, n):
	d.append(l[i] - l[i - 1])
c = 1
m = 0
for i in range(n - 1):
	if d[i] <= l[i]:
		c += 1
	else:
		m = max(c, m)
		c = 1
print(max(m, c))


n = int(input())
arr = [int(j) for j in input().split()]
stack = []
max_ = 0
for i in range(n):
	if not stack:
		stack.append(arr[i])
	elif arr[i] <= 2 * stack[-1]:
		stack.append(arr[i])
	else:
		max_ = max(len(stack), max_)
		stack = [arr[i]]
print(max(max_, len(stack)))


n = int(input())
mas = [int(x) for x in input().split()]
ans = 1
cnt = 1
for i in range(n - 1):
	if mas[i] * 2 >= mas[i + 1]:
		cnt += 1
	else:
		ans = max(ans, cnt)
		cnt = 1
print(max(ans, cnt))


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


import bisect
n = int(input())
arr = list(map(int, input().strip().split(' ')))
mx = 0
i = n - 2
cnt = 1
while i >= 0:
	if 2 * arr[i] >= arr[i + 1]:
		cnt += 1
	else:
		mx = max(cnt, mx)
		cnt = 1
	i -= 1
print(max(cnt, mx))


n = int(input())
a = list(map(int, input().split()))
ind1 = 0
ind2 = 1
res = 1
while ind1 < n:
	while ind2 < n and a[ind2] <= a[ind2 - 1] * 2:
		ind2 += 1
	res = max(res, ind2 - ind1)
	ind1 = ind2
	ind2 = ind1 + 1
print(res)


n = int(input())
a = [int(t) for t in input().split()]
max_len = 0
l = 0
for r in range(1, n + 1):
	if r == n or a[r] > a[r - 1] * 2:
		max_len = max(max_len, r - l)
		l = r
print(max_len)


n = int(input())
arr = input().split()
count = 1
max_count = 1
for i in range(n - 1):
	if int(arr[i + 1]) > int(arr[i]) and int(arr[i + 1]) <= 2 * int(arr[i]):
		count += 1
		if count > max_count:
			max_count = count
	else:
		count = 1
print(max_count)


l = int(input())
ln = [int(i) for i in input().split(' ')]
s = 1
ms = 1
for i in range(1, len(ln)):
	if ln[i] / ln[i - 1] <= 2:
		s += 1
		ms = max(ms, s)
	else:
		s = 1
print(ms)


import sys
sys.stdin.readline()
s = list(map(int, sys.stdin.readline().split()))
count = 1
m = 1
for i in range(len(s) - 1):
	if s[i + 1] <= 2 * s[i]:
		count += 1
	else:
		if count > m:
			m = count
		count = 1
sys.stdout.write(f'{max(m, count)}')


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


N = int(input())
compl = [int(x) for x in input().split()]
relative = []
for i in range(len(compl) - 1):
	relative.append(compl[i + 1] / compl[i])
m = 0
k = 0
for i in range(len(relative)):
	if relative[i] <= 2:
		m += 1
	else:
		m = 0
	if k < m:
		k = m
print(k + 1)


n = int(input())
a = [int(i) for i in input().split(' ')]
l = [1]
for i in range(1, n):
	if a[i] > 2 * a[i - 1]:
		l.append(1)
	else:
		l[-1] += 1
print(max(l))


n = int(input())
a = list(map(int, input().split()))
m = 0
i = 0
while i < n:
	b = 1
	j = i + 1
	while j < n and a[j] <= a[j - 1] * 2:
		j += 1
		b += 1
	m = max(b, m)
	i = j
m = max(b, m)
print(m)


n = int(input())
arr = list(map(lambda x: int(x), input().split()))
m = 1
if n == 0:
	m = 0
prev = -1
count = 1
for i in range(1, n):
	if arr[i] > 2 * arr[i - 1]:
		if count > m:
			m = count
		count = 1
	else:
		count += 1
if count > m:
	m = count
print(m)


import sys
import os
import math
import copy
from math import gcd
from bisect import bisect
from io import BytesIO, IOBase
from math import sqrt, floor, factorial, gcd, log, ceil
from collections import deque, Counter, defaultdict
from itertools import permutations, combinations
import itertools

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

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

def Lstr():
	return list(sys.stdin.readline().strip())

def Str():
	return sys.stdin.readline().strip()

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

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

def Hash():
	return dict()

def Mod():
	return 1000000007

def Ncr(n, r, p):
	return fact[n] * (ifact[r] * ifact[n - r] % p) % p

def Most_frequent(list):
	return max(set(list), key=list.count)

def Mat2x2(n):
	return [List() for _ in range(n)]

def Lcm(x, y):
	return x * y // gcd(x, y)

def dtob(n):
	return bin(n).replace('0b', '')

def btod(n):
	return int(n, 2)

def common(l1, l2):
	return set(l1).intersection(l2)

def solution():
	n = Int()
	l = List()
	c = 1
	p = []
	for i in range(n - 1):
		if l[i + 1] <= 2 * l[i]:
			c += 1
		else:
			p.append(c)
			c = 1
	else:
		p.append(c)
	print(max(p))
solution()


n = int(input())
A = list(map(int, input().split()))
j = 0
ans = 1
from collections import deque
q = deque([])
for i in range(n):
	while j < n:
		if q:
			if A[j] <= 2 * q[-1]:
				q.append(A[j])
				j += 1
			else:
				break
		else:
			q.append(A[j])
			j += 1
	ans = max(ans, j - i)
	if i == j:
		j += 1
	else:
		q.popleft()
print(ans)


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


n = int(input())
z = list(map(int, input().split()))
count = []
maxi = 1
i = 0
while i < n - 1:
	if z[i] * 2 >= z[i + 1]:
		maxi += 1
	else:
		count.append(maxi)
		maxi = 1
	i += 1
count.append(maxi)
print(max(count))


import math
import functools

def s():
	n = int(input())
	a = list(map(int, input().split(' ')))
	ans = 1
	max_ans = 1
	for i in range(0, n - 1):
		if a[i + 1] <= a[i] * 2:
			ans += 1
		else:
			ans = 1
		max_ans = max(ans, max_ans)
	print(max_ans)
s()


n = int(input())
a = [int(el) for el in input().split()]
b = [1] * n
for i in range(1, n):
	if a[i] <= a[i - 1] * 2:
		b[i] = b[i - 1] + 1
print(max(b))


n = int(input())
v = list(map(int, input().split()))
(ans, accm, prev) = (1, 1, v[0])
for x in v[1:]:
	accm = accm + 1 if x <= 2 * prev else 1
	(ans, prev) = (max(ans, accm), x)
print(ans)


import sys
import math
from collections import defaultdict, deque
input = sys.stdin.readline

def inar():
	return [int(el) for el in input().split()]

def main():
	n = int(input())
	arr = inar()
	ans = 1
	len = 1
	for i in range(1, n):
		if arr[i - 1] * 2 >= arr[i]:
			len += 1
		else:
			ans = max(ans, len)
			len = 1
	print(max(ans, len))
main()


n = int(input())
mass = list(map(int, input().split()))
he = 1
cnt = 1
for u in range(len(mass) - 1):
	if mass[u] * 2 < mass[u + 1]:
		he = max(he, cnt)
		cnt = 1
	else:
		cnt += 1
print(max(cnt, he))


from sys import stdin
from bisect import bisect_right
inp = lambda : stdin.readline().strip()
n = int(inp())
a = [int(x) for x in inp().split()]
curr = 1
ans = 1
for i in range(1, n):
	if a[i] > a[i - 1] * 2:
		curr = 1
	else:
		curr += 1
	ans = max(ans, curr)
print(ans)


import sys
input = sys.stdin.readline
n = int(input())
l = list(map(int, input().split()))
c = 0
ans = 0
for i in range(1, n):
	if l[i] > 2 * l[i - 1]:
		ans = max(ans, c)
		c = 0
	else:
		c += 1
ans = max(ans, c)
print(ans + 1)


n = int(input())
p = list(map(int, input().split()))
a = [1] + [0] * (2 * 10 ** 5 - 1)
if n == 1:
	print(1)
else:
	for i in range(1, n):
		if p[i] <= p[i - 1] * 2:
			a[i] = a[i - 1] + 1
		else:
			a[i] = 1
	print(max(a))


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


n = int(input())
L = [int(x) for x in input().split()]
T = []
temp = 1
for i in range(n - 1):
	if 2 * L[i] >= L[i + 1]:
		temp += 1
	else:
		T.append(temp)
		temp = 1
T.append(temp)
print(max(T))


def sol():
	l = 0
	r = 0
	s = 0
	for i in range(1, n):
		if problems[i] <= 2 * problems[i - 1]:
			r += 1
		else:
			s = max(s, r - l + 1)
			l = i
			r = i
	s = max(s, r - l + 1)
	return s
n = int(input())
problems = [int(x) for x in input().split(' ')]
print(sol())


I = lambda : map(int, input().split())
c = 1
mxx = 1
n = int(input())
a = list(I())
for i in range(n - 1):
	if a[i + 1] <= 2 * a[i]:
		c += 1
	else:
		c = 1
	mxx = max(c, mxx)
print(mxx)


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


n = int(input())
arr = list(map(int, input().split(' ')))
maxi = 1
n = 1
for (ind, elem) in enumerate(arr[:-1]):
	if 2 * elem < arr[ind + 1]:
		if n > maxi:
			maxi = n
		n = 1
	else:
		n += 1
if n > maxi:
	maxi = n
print(maxi)


n = int(input())
a = [int(x) for x in input().split()]
ans = 1
q = 1
for i in range(n):
	if i == n - 1 or a[i + 1] > 2 * a[i]:
		ans = max(ans, q)
		q = 1
	else:
		q += 1
print(ans)


n = tuple((int(i) for i in input().split(' ')))
tab = list((int(i) for i in input().split(' ')))
max = 1
(i, j) = (0, 1)
while j < len(tab):
	while j < len(tab) and tab[j] <= 2 * tab[j - 1]:
		j += 1
	if j - i > max:
		max = j - i
	i = j
	j += 1
print(max)


def main():
	n = int(input())
	a = list(map(int, input().split()))
	L = 0
	R = 0
	res = 0
	while R < n:
		while R < n - 1 and a[R + 1] <= 2 * a[R]:
			R += 1
		res = max(res, R - L + 1)
		L = R + 1
		R = L
	print(res)
main()


n = int(input())
count = 1
l = list(map(int, input().strip().split(' ')))
result = 1
for i in range(len(l) - 1):
	if l[i + 1] <= l[i] * 2:
		count += 1
	else:
		result = max(result, count)
		count = 1
	result = max(result, count)
print(result)


n = int(input())
a = list(map(int, input().split()))
acc = 1
MAX = 1
for i in range(1, n):
	if a[i] <= 2 * a[i - 1]:
		acc = acc + 1
		MAX = max(MAX, acc)
	else:
		acc = 1
print(MAX)


n = int(input())
a = list(map(int, input().split()))
ans = 0
last = 1
for i in range(1, n + 1):
	if i < n and a[i] <= a[i - 1] * 2:
		last += 1
	else:
		ans = max(last, ans)
		last = 1
print(ans)


import math as ma
from sys import exit
from decimal import Decimal as dec
from itertools import permutations

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

def modInverse(a, m):
	m0 = m
	y = 0
	x = 1
	if m == 1:
		return 0
	while a > 1:
		q = a // m
		t = m
		m = a % m
		a = t
		t = y
		y = x - q * y
		x = t
	if x < 0:
		x = x + m0
	return x

def num():
	return map(int, input().split())

def nu():
	return int(input())

def find_gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
n = nu()
a = li()
xx = 0
ll = 1
for i in range(1, n):
	if a[i] <= 2 * a[i - 1]:
		ll += 1
	else:
		xx = max(ll, xx)
		ll = 1
xx = max(ll, xx)
if n == 1:
	print(1)
else:
	print(xx)


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


import sys
import collections as cc
I = lambda : list(map(int, input().split()))
(n,) = I()
l = I()
prev = l[0]
ans = 1
an = 0
for i in range(1, n):
	if l[i] <= 2 * prev:
		ans += 1
		prev = l[i]
	else:
		an = max(ans, an)
		ans = 1
		prev = l[i]
an = max(an, ans)
print(an)


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


n = int(input())
a = list(map(int, input().split()))
l = 0
f = 0
mx = 1
for i in range(n):
	if a[i] > 2 * a[i - 1]:
		l = i - 1
		ln = l - f + 1
		mx = max(mx, ln)
		f = i
mx = max(n - f, mx)
print(mx)


def two_pointer(arr, n):
	(i, j) = (0, 0)
	ans = 1
	while i < n:
		j = i
		while j + 1 < n and arr[j + 1] <= arr[j] * 2:
			j += 1
		ans = max(ans, j - i + 1)
		i = j + 1
	return ans
n = int(input())
arr = list(map(int, input().split()))
print(two_pointer(arr, len(arr)))


n = int(input())
arr = list(map(int, input().split()))
cur = 0
ans = 0
cnt = 1
for i in arr:
	if i <= cur * 2:
		cnt += 1
	elif cnt > ans:
		ans = cnt
		cnt = 1
	else:
		cnt = 1
	cur = i
if cnt > ans:
	ans = cnt
print(ans)


amount = int(input())
diffs = [int(i) for i in input().split()]
ret = 1
m = 1
for i in range(1, amount):
	if diffs[i] <= diffs[i - 1] * 2:
		m += 1
		ret = max(ret, m)
	else:
		m = 1
print(ret)


n = int(input())
S = list(map(int, input().split()))
ans = 0
S.append(S[-1] * 2 + 1)
count = 0
posled = S[0]
for i in range(n + 1):
	now = S[i]
	if now <= posled * 2:
		count += 1
		posled = now
	else:
		ans = max(ans, count)
		count = 1
		posled = now
print(ans)


q = input()
q = list(map(int, input().split()))
q.sort()
ma = 1
no = 1
for w in range(len(q) - 1):
	(v, b, n) = (q[w], q[w + 1], q[w] * 2)
	if q[w] < q[w + 1] <= q[w] * 2:
		no += 1
	else:
		no = 1
	ma = max(no, ma)
print(ma)


I = input
n = int(I())
a = list(map(int, I().split()))
r = []
for i in range(len(a) - 1):
	r.append(1 if a[i + 1] <= a[i] * 2 else 0)
m = cur = 0
for i in r:
	if i == 1:
		cur += 1
	else:
		cur = 0
	if m < cur:
		m = cur
print(m + 1)


n = int(input())
l = list(map(int, input().strip().split()))
le = 1
lm = 0
prev = l[0]
for i in range(1, n):
	if l[i] <= prev * 2:
		le = le + 1
		prev = l[i]
	else:
		if le > lm:
			lm = le
		le = 1
		prev = l[i]
if le > lm:
	lm = le
print(lm)


n = int(input())
tmp = input().split()
a = []
for i in range(n):
	a.append(int(tmp[i]))
ans = 1
now = 1
for i in range(1, n):
	if a[i] > a[i - 1] * 2:
		now = 1
	else:
		now = now + 1
	if now > ans:
		ans = now
print(ans)


n = int(input())
a = [int(x) for x in input().split()]
t = n
mx = 1
start = 0
end = 0
for i in range(n - 1):
	if a[i + 1] > a[i] * 2:
		start = i
		end = i
	else:
		end += 1
		mx = max(mx, end - start + 1)
print(mx)


n = int(input())
l = list(map(int, input().split()))
mximm = 1
c = 1
for q in range(len(l) - 1):
	if l[q + 1] <= 2 * l[q]:
		c = c + 1
		if l[q + 1] == l[-1]:
			if c > mximm:
				mximm = c
	else:
		if c > mximm:
			mximm = c
		c = 1
print(mximm)


n = int(input())
a = list(map(int, input().split()))
prew = a[0]
lent = 0
lmax = 1
for i in a:
	if i <= 2 * prew:
		lent += 1
		if lent > lmax:
			lmax = lent
	else:
		lent = 1
	prew = i
print(lmax)


n = int(input())
D = list(map(int, input().split()))
count = 1
ANS = 0
for i in range(1, n):
	if D[i] <= 2 * D[i - 1]:
		count += 1
	else:
		if ANS < count:
			ANS = count
		count = 1
if ANS < count:
	ANS = count
print(ANS)


def sol():
	N = int(input())
	lst = list(reversed([int(x) for x in input().split(' ')]))
	nx = float(lst[0]) / 2.0
	best = 1
	current = 1
	for item in lst[1:]:
		if item >= nx:
			current += 1
			best = max(best, current)
		else:
			current = 1
		nx = float(item) / 2.0
	print(best)
sol()


n = input()
ls = list(map(int, input().split(' ')))
cur = 1
max = 1
for i in range(1, len(ls)):
	if ls[i] <= 2 * ls[i - 1]:
		cur += 1
	else:
		cur = 1
	if cur > max:
		max = cur
print(max)


n = int(input())
a = list(map(int, input().split()))
maximum = 1
tec = 1
for num in range(1, n):
	if a[num] <= 2 * a[num - 1]:
		tec += 1
	else:
		maximum = max(maximum, tec)
		tec = 1
maximum = max(tec, maximum)
print(maximum)


t = 1
n = int(input())
l = list(map(int, input().split()))
z = 0
for i in range(1, n):
	if l[i] <= 2 * l[i - 1] and l[i] > l[i - 1]:
		t = t + 1
	else:
		z = max(t, z)
		t = 1
z = max(t, z)
print(z)


n = int(input().strip())
nums = list(map(int, input().strip().split(' ')))
l = r = 0
ans = 1
while r < n - 1:
	if nums[r + 1] <= nums[r] * 2:
		r += 1
	else:
		ans = max(ans, r - l + 1)
		r += 1
		l = r
ans = max(ans, r - l + 1)
print(ans)


n = input()
A = [*map(int, input().split())]
ans = 1
longest = 1
for i in range(1, len(A)):
	if A[i - 1] * 2 >= A[i]:
		longest += 1
	else:
		longest = 1
	ans = max(ans, longest)
print(ans)


n = int(input())
tasks = [int(i) for i in input().split()]
max_seq = [1] * n
for i in range(n - 1):
	if tasks[i + 1] <= tasks[i] * 2:
		max_seq[i + 1] += max_seq[i]
print(max(max_seq))


n = int(input())
ans = 0
max_ans = 0
x = list(map(int, input().split()))
for i in range(1, n):
	if 2 * x[i - 1] >= x[i] > x[i - 1]:
		ans += 1
	else:
		if ans > max_ans:
			max_ans = ans
		ans = 0
print(max(ans, max_ans) + 1)


n = int(input())
m = 0
lo = []
k = list(map(int, input().split()))
for x in range(0, len(k) - 1):
	if k[x + 1] <= k[x] * 2:
		m += 1
	else:
		lo.append(m)
		m = 0
lo.append(m)
print(max(lo) + 1)


from sys import stdin
input = lambda : stdin.readline()
n = int(input())
l = list(map(int, input().split()))
z = [0]
for i in range(n - 1):
	if 2 * l[i] < l[i + 1]:
		z.append(i + 1)
z.append(n)
m = -1000
for i in range(1, len(z)):
	m = max(m, z[i] - z[i - 1])
print(m)


def zadachi(lst):
	(count1, count2) = (0, 0)
	for i in range(len(lst) - 1):
		if 2 * lst[i] >= lst[i + 1]:
			count1 += 1
		else:
			count2 = max(count1, count2)
			count1 = 0
	count2 = max(count1, count2)
	return count2 + 1
n = int(input())
a = [int(j) for j in input().split()]
print(zadachi(a))


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


import math
n = int(input())
a = list(map(int, input().split()))
dp = [1] * n
mmax = 1

def helper(v, l, r, a):
	while l < r:
		mid = (l + r) // 2
		if a[mid] < v:
			l = mid + 1
		else:
			r = mid
	if a[l] >= v:
		return l
	else:
		return -1
for i in range(1, n):
	cur = math.ceil(a[i] / 2)
	if a[i - 1] >= cur:
		dp[i] = dp[i - 1] + 1
	mmax = max(mmax, dp[i])
print(mmax)


n = int(input())
ar = [int(i) for i in input().split()]
arf = []
k = 1
if len(ar) == 1:
	print(1)
	exit()
for i in range(0, len(ar) - 1):
	if ar[i + 1] <= ar[i] * 2:
		arf.append(k)
		k += 1
	else:
		arf.append(0)
		k = 1
print(max(arf) + 1)


n = int(input())
l = list(map(int, input().split()))
max = 1
j = 1
for i in range(n - 1):
	if 2 * l[i] >= l[i + 1]:
		j += 1
	if 2 * l[i] >= l[i + 1] and i == n - 2 and (j >= max):
		max = j
		break
	if 2 * l[i] < l[i + 1]:
		if j >= max:
			max = j
			j = 1
		else:
			j = 1
print(max)


n = int(input())
a = [int(i) for i in input().strip().split(' ')]
maxlen = [1]
temp = 1
for i in range(n - 1):
	if a[i + 1] <= 2 * a[i]:
		temp += 1
	else:
		maxlen.append(temp)
		temp = 1
print(max(max(maxlen), temp))


n = int(input())
a = [int(i) for i in input().split()]
ans = [1] * n
for i in range(1, n):
	k = a[i] / 2
	if a[i - 1] >= k:
		ans[i] = ans[i - 1] + 1
print(max(ans))


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


import os
import sys
from math import *
from collections import *
from fractions import *
from bisect import *
from heapq import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
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')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def value():
	return tuple(map(int, input().split()))

def array():
	return [int(i) for i in input().split()]

def Int():
	return int(input())

def Str():
	return input()

def arrayS():
	return [i for i in input().split()]
n = Int()
a = array()
ans = 0
i = 0
while i < n:
	i += 1
	c = 1
	while i < n and a[i] <= a[i - 1] * 2:
		i += 1
		c += 1
	ans = max(c, ans)
print(ans)


n = int(input())
mas = list(map(int, input().split()))
maxx = 1
d = 0
t = True
for i in range(n - 1):
	if mas[i + 1] <= 2 * mas[i]:
		d += 1
		t = False
	else:
		if d > maxx:
			maxx = d
		d = 0
if d > maxx:
	maxx = d
if t == False:
	print(maxx + 1)
else:
	print(maxx)


n = int(input())
arr = list(map(int, input().split(' ')))
arr1 = [0] * n
for i in range(0, n - 1):
	if arr[i + 1] <= 2 * arr[i]:
		arr1[i] = 1
str1 = ''.join((str(e) for e in arr1))
ans = max(map(len, str1.split('0')))
print(ans + 1)


a = int(input())
enter = list(map(int, input().rstrip().split()))
total = 0
new = 0
for i in range(a - 1):
	if int(enter[i]) * 2 >= int(enter[i + 1]):
		new += 1
		if new > total:
			total = new
	else:
		new = 0
		continue
print(total + 1)


r = input
n = int(r())
a = [int(x) for x in r().split()]
X = 0
cnt = 0
(l, r) = (0, 0)
ans = 0
while l < n:
	r = l
	while r + 1 < n and a[r] * 2 >= a[r + 1]:
		r += 1
	if ans < r - l + 1:
		ans = r - l + 1
	l = r + 1
print(ans)


n = int(input())
L = list(map(int, input().split()))
dp = [1]
mx = 1
for i in range(1, n):
	if L[i] <= 2 * L[i - 1]:
		dp.append(dp[i - 1] + 1)
	else:
		dp.append(1)
	mx = max(mx, dp[i])
print(mx)


from collections import deque
num = map(int, input().split())
values = list(map(int, input().split()))
best_value = 0
queue = deque()
for (i, value) in enumerate(values):
	if len(queue) == 0:
		queue.append(value)
		best_value = 1
	else:
		peek = queue[-1]
		if value <= 2 * peek:
			queue.append(value)
		else:
			queue.clear()
			queue.append(value)
		best_value = max(best_value, len(queue))
print(max(best_value, len(queue)))


n = int(input())
a = list(map(int, input().split()))
maxj = 1
i = 0
while i < n:
	if i <= n - maxj:
		j = 1
		while j - 1 < n - i - 1 and 2 * a[i + j - 1] >= a[i + j]:
			j += 1
		if j > maxj:
			maxj = j
	if i < j:
		i = j
	else:
		i += 1
print(maxj)


input()
(p, r) = (0, 1)
for x in map(int, input().split()):
	if x > 2 * p:
		m = 1
	else:
		m += 1
		r = max(r, m)
	p = x
print(r)


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


n = int(input())
a = [int(x) for x in input().split()]
max = 1
cur = 1
for i in range(0, n - 1):
	x1 = a[i] * 2
	x2 = a[i + 1]
	if x1 >= x2:
		cur += 1
	else:
		if cur > max:
			max = cur
		cur = 1
if cur > max:
	max = cur
print(max)


n = int(input())
a = [int(x) for x in input().split()]
result = 0
count = 1
temp = a[n - 1] / 2
for i in range(n - 2, -1, -1):
	if a[i] >= temp:
		count += 1
	else:
		result = max(result, count)
		count = 1
	temp = a[i] / 2
result = max(result, count)
print(result)


n = int(input())
arr = list(map(int, input().split()[:n]))
maximum = 1
tempCount = 1
for i in range(1, n):
	if arr[i] > arr[i - 1] * 2:
		tempCount = 1
	else:
		tempCount += 1
	maximum = max(tempCount, maximum)
print(maximum)


import sys
inf = float('inf')
mod = 1000000007

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

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

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

def main():
	n = int(input())
	arr = get_array()
	dp = [1] * n
	for i in range(1, n):
		if arr[i] <= 2 * arr[i - 1]:
			dp[i] = 1 + dp[i - 1]
	print(max(dp))
main()


n = int(input())
arr = list(map(int, input().split()))
size = 1
mm = 1
for i in range(1, len(arr)):
	if arr[i] <= 2 * arr[i - 1]:
		size += 1
	else:
		mm = max(size, mm)
		size = 1
mm = max(mm, size)
print(mm)


n = int(input())
arr = list(map(int, input().split()))
i = 1
j = 0
c = 0
if n == 1:
	print(1)
else:
	while i < n:
		if arr[i - 1] * 2 >= arr[i] and arr[i] > arr[i - 1]:
			if i + 1 == n:
				c = max(i - j, c)
			i += 1
		else:
			c = max(i - j - 1, c)
			j = i
			i += 1
	print(c + 1)


n = int(input())
a = list(map(int, input().split(' ')))
lenmax = 0
holdlastnum = a[0]
thislen = 1
for i in range(1, n):
	if a[i] <= holdlastnum * 2:
		thislen += 1
	else:
		if thislen > lenmax:
			lenmax = thislen
		thislen = 1
	holdlastnum = a[i]
if thislen > lenmax:
	lenmax = thislen
print(lenmax)


def main():
	n = int(input())
	a = [int(elem) for elem in input().split()]
	ans = 1
	prev = 0
	t_ans = ans
	for i in range(1, n):
		if a[i] > 2 * a[i - 1]:
			if t_ans > ans:
				ans = t_ans
			t_ans = 1
		else:
			t_ans += 1
	if t_ans > ans:
		ans = t_ans
	print(ans)
main()


import sys
from itertools import accumulate

def input():
	return sys.stdin.readline().strip()

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 18
MOD = 10 ** 9 + 7
N = INT()
A = LIST()
idxs = [0]
for (i, a) in enumerate(A[1:], 1):
	if a > A[i - 1] * 2:
		idxs.append(i)
idxs.append(N)
M = len(idxs)
ans = 0
for i in range(M - 1):
	ans = max(ans, idxs[i + 1] - idxs[i])
print(ans)


import sys
n = int(sys.stdin.readline())
s = str(sys.stdin.readline()).split(' ')
s = [int(x) for x in s]
s2 = [x * 2 for x in s]
maxCount = 1
Count = 1
for i in range(n - 1):
	if s2[i] >= s[i + 1]:
		Count = Count + 1
	else:
		if maxCount < Count:
			maxCount = Count
		Count = 1
if maxCount < Count:
	maxCount = Count
print(maxCount)


a = int(input())
nums = []
nums = map(int, input().split())
curMax = 0
maxMax = 0
cur = 0
for num in nums:
	if num <= 2 * cur:
		curMax += 1
	else:
		curMax = 1
	cur = num
	if curMax > maxMax:
		maxMax = curMax
print(maxMax)


n = int(input())
arr = [int(i) for i in input().split()]
s = 1
s_max = s
for i in range(n - 1):
	mn = arr[i] * 2
	if arr[i + 1] <= mn:
		s += 1
	else:
		if s > s_max:
			s_max = s
		s = 1
if s > s_max:
	s_max = s
print(s_max)


n = int(input())
lst = [int(i) for i in input().split()]
flag = True
mx = 1
cur = 1
for i in range(1, len(lst)):
	if lst[i - 1] * 2 >= lst[i]:
		cur += 1
	else:
		if cur > mx:
			mx = cur
		cur = 1
if cur > mx:
	mx = cur
print(mx)


N = int(input())
A = list(map(int, input().split()))
if N == 1:
	print(1)
else:
	a = A[0]
	mp = 0
	cp = 1
	for b in A[1:]:
		if b > 2 * a:
			mp = max(mp, cp)
			cp = 1
		else:
			cp += 1
		a = b
	mp = max(mp, cp)
	print(mp)


n = int(input())
line = list(map(int, input().split()))
maxi = 1
ans = [0] * n
ans[n - 1] = 1
for x in range(n - 2, -1, -1):
	if line[x] * 2 >= line[x + 1]:
		ans[x] = ans[x + 1] + 1
	else:
		ans[x] = 1
	maxi = max(maxi, ans[x])
print(maxi)


n = int(input())
u = list(map(int, input().split()))
ans = 0
p = 1
for i in range(1, n):
	if u[i - 1] * 2 >= u[i]:
		p += 1
	else:
		if p > ans:
			ans = p
		p = 1
if p > ans:
	ans = p
print(ans)


n = int(input())
a = [int(x) for x in input().split()]
(x, y) = (0, 1)
maxx = -1
maxcnt = 1
if n == 1:
	print(1)
else:
	while x < n and y < n:
		if 2 * a[x] >= a[y]:
			x += 1
			y += 1
			maxcnt += 1
		else:
			maxcnt = 1
			x += 1
			y += 1
		if maxcnt > maxx:
			maxx = maxcnt
	print(maxx)


n = int(input())
a = list(map(int, input().split()))
diff = 0
j = 0
for i in range(n):
	if 2 * a[i - 1] < a[i]:
		j = i
	diff = max(diff, i - j)
print(diff + 1)


a = int(input())
b = list(map(int, input().split()))
b.append(b[a - 1] + 1)
m = 1
t = 1
for i in range(1, a):
	if b[i - 1] * 2 >= b[i]:
		t += 1
	else:
		t = 1
	if t > m:
		m = t
print(m)


a = int(input())
h = list(map(int, input().split()))
g = 1
p = 0
for i in range(a - 1):
	if h[i] * 2 >= h[i + 1]:
		g += 1
	else:
		if g > p:
			p = g
		g = 1
if g > p:
	p = g
print(p)


def work(n, a):
	tmp = 1
	maxV = 1
	for i in range(1, n):
		if a[i] <= a[i - 1] * 2:
			tmp += 1
		else:
			maxV = max(maxV, tmp)
			tmp = 1
	return max(maxV, tmp)
n = int(input())
a = tuple(map(int, input().split()))
print(work(n, a))


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


import sys
N = int(input())
T = list(map(int, sys.stdin.readline().split()))
i = 0
j = 0
ans = 1
while j < N - 1:
	while j < N - 1 and 2 * T[j] >= T[j + 1]:
		j = j + 1
	j = j + 1
	if ans < j - i:
		ans = j - i
	i = j
print(ans)


n = int(input())
l = list(map(int, input().split()))
r = [1] * n
for i in range(1, n):
	if 2 * l[i - 1] >= l[i]:
		r[i] = r[i - 1] + 1
print(max(r))


from sys import stdin, stdout
n = int(stdin.readline())
l = list(map(int, stdin.readline().split()))
l2 = []
for i in range(n - 1):
	a = l[i]
	b = l[i + 1]
	if b / a > 2:
		l2.append(2)
	else:
		l2.append(1)
m = 0
mm = 0
for i in range(n - 1):
	if l2[i] == 1:
		m += 1
	if i == n - 2 or l2[i] != 1:
		if m > mm:
			mm = m
			j = i
		m = 0
print(mm + 1)


n = int(input())
l = list(map(int, input().split()))
s = 1
m = 1
i = 1
while i <= n - 1:
	if l[i] > 2 * l[i - 1]:
		s = 1
	else:
		s += 1
	if s > m:
		m = s
	i += 1
print(m)


n = int(input())
nums = list(map(int, input().split()))
i = 0
longest = 1
while i < n - 1:
	length = 1
	while i + 1 < n and nums[i] * 2 >= nums[i + 1]:
		i += 1
		length += 1
	longest = max(longest, length)
	i += 1
print(longest)


n = input()
s = list(map(int, input().split()))
ans = [-1]
mx = 0
for x in s:
	if x > 2 * ans[-1]:
		mx = max(mx, len(ans))
		ans = [x]
	else:
		ans.append(x)
mx = max(mx, len(ans))
print(mx)


z = int(input())
a = list(map(int, input().split()))
iterator = 0
max_length = 0
if z == 1:
	print(1)
else:
	while iterator < z:
		local_max = 1
		for i in range(iterator, z - 1):
			if 2 * a[i] >= a[i + 1]:
				local_max += 1
			else:
				if i == z - 2:
					check = z
				else:
					check = i
				break
		if local_max > max_length:
			max_length = local_max
		if i != z - 2:
			iterator = check + 1
		else:
			break
	print(max_length)


n = int(input())
v = list(map(int, input().split()))
i = 0
j = 0
ans = -1
while i < n:
	j = i
	while j + 1 < n:
		if v[j + 1] > 2 * v[j]:
			break
		j += 1
	ans = max(ans, j - i + 1)
	if i == j:
		i += 1
	else:
		i = j
print(ans)


n = int(input())
l = [*map(int, input().split())]
i = 0
mx = 1
while i < n:
	count = 1
	j = i + 1
	while j < n and l[j] <= l[j - 1] * 2:
		j += 1
		count += 1
	i = j
	mx = max(mx, count)
print(mx)


import sys
import math
import collections
import bisect

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

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

def get_string():
	return sys.stdin.readline().strip()
for t in range(1):
	n = int(input())
	arr = get_list()
	ans = 1
	start = 0
	end = 1
	c = 1
	while start < n and end < n:
		if arr[start] * 2 >= arr[end]:
			start += 1
			end += 1
			c += 1
			ans = max(ans, c)
		else:
			c = 1
			start = end
			end += 1
	print(ans)


n = int(input())
arr = list(map(int, input().split()))
arr.reverse()
ma = -1
curr = 1
x = 0
while x < n - 1:
	if arr[x + 1] * 2 >= arr[x]:
		curr += 1
		x += 1
	else:
		x += 1
		ma = max(ma, curr)
		curr = 1
print(max(ma, curr))


t = int(input())
l = list(map(int, input().split()))
length = 1
i = 0
while i < t:
	j = i
	while j < t - 1:
		if l[j] * 2 < l[j + 1]:
			break
		j += 1
	length = max(length, j - i + 1)
	i = j + 1
print(length)


import time
from sys import stdout, stdin

def myfunction(n, arr):
	prev = arr[0]
	m = 1
	maxm = 1
	for i in range(1, n):
		if arr[i] <= 2 * prev:
			m += 1
		else:
			m = 1
		prev = arr[i]
		maxm = max(m, maxm)
	return maxm
n = int(stdin.readline())
arr = list(map(int, stdin.readline().split()))
m = myfunction(n, arr)
m = '%d' % m
stdout.write(m)


input()
a = list(map(int, input().split()))
c = 1
cur = 0
l = []
for i in a:
	if i <= cur * 2:
		c += 1
	else:
		l.append(c)
		c = 1
	cur = i
l.append(c)
print(max(l))


from sys import stdin, stdout
n = int(stdin.readline())
A = [int(i) for i in stdin.readline().split()]
ans = [1] * n
check = [False] * n
for i in range(0, n):
	if check[i] == False:
		for j in range(i, n - 1):
			if 2 * A[j] >= A[j + 1]:
				ans[i] += 1
				check[j] = True
			else:
				i = j + 1
				break
ans.sort()
print(ans[len(ans) - 1])


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


(z, zz) = (input, lambda : list(map(int, z().split())))
zzz = lambda : [int(i) for i in stdin.readline().split()]
(szz, graph, mod, szzz) = (lambda : sorted(zz()), {}, 10 ** 9 + 7, lambda : sorted(zzz()))
from string import *
from re import *
from collections import *
from queue import *
from sys import *
from collections import *
from math import *
from heapq import *
from itertools import *
from bisect import *
from collections import Counter as cc
from math import factorial as f
from bisect import bisect as bs
from bisect import bisect_left as bsl
from itertools import accumulate as ac

def lcd(xnum1, xnum2):
	return xnum1 * xnum2 // gcd(xnum1, xnum2)

def prime(x):
	p = ceil(x ** 0.5) + 1
	for i in range(2, p):
		if x % i == 0 and x != 2 or x == 0:
			return 0
	return 1

def dfs(u, visit, graph):
	visit[u] = True
	for i in graph[u]:
		if not visit[i]:
			dfs(i, visit, graph)
n = int(z())
l = zzz()
ans = 0
x = l[-1]
t = 1
for i in range(2, n + 1):
	if x <= l[-i] * 2:
		t += 1
		x = l[-i]
	else:
		ans = max(ans, t)
		t = 1
		x = l[-i]
print(max(ans, t))


n = int(input())
a = list(map(int, input().split()))
(L, R, ans) = (0, 0, 1)
while True:
	if R == n - 1:
		ans = max(ans, R - L + 1)
		break
	if a[R] * 2 >= a[R + 1]:
		R += 1
	else:
		ans = max(ans, R - L + 1)
		R += 1
		L = R
print(ans)


n = int(input())
b = list(map(int, input().split()))
j = 0
p = 1
q = 1
while j < n - 1:
	if b[j + 1] / b[j] > 2:
		q = 1
	else:
		q += 1
	p = max(p, q)
	j += 1
print(p)


def mi():
	return map(int, input().split())
n = int(input())
a = list(mi())
c = 1
maxc = 1
for i in range(1, n):
	if a[i] / a[i - 1] <= 2:
		c += 1
	else:
		c = 1
	maxc = max(c, maxc)
print(maxc)


n = int(input())
array = [int(x) for x in input().split()]
boolarray = []
for i in range(0, n - 1):
	if array[i] * 2 >= array[i + 1]:
		boolarray.append(True)
	else:
		boolarray.append(False)
start = 0
maxarray = []
for i in range(0, n - 1):
	if i == n - 2:
		if boolarray[i] == False:
			maxarray.append(i - start)
			break
		else:
			maxarray.append(i - start + 1)
			break
	if boolarray[i] == False:
		if i - start != 0:
			maxarray.append(int(i - start))
		else:
			pass
		start = i + 1
length = len(maxarray)
maxi = 0
for i in range(0, length):
	if maxarray[i] > maxi:
		maxi = maxarray[i]
print(maxi + 1)


n = int(input())
lst = [int(x) for x in input().split()]
mx = 1
maxi = 1
for i in range(n - 1):
	if lst[i] * 2 >= lst[i + 1]:
		mx += 1
	else:
		maxi = max(mx, maxi)
		mx = 1
print(max(maxi, mx))


def __starting_point():
	n = int(input().strip())
	arr = [int(__) for __ in input().strip().split()]
	if n == 1:
		print(1)
	else:
		(cur, ma) = (1, 1)
		for i in range(1, n):
			if arr[i] <= 2 * arr[i - 1]:
				cur += 1
				ma = max(cur, ma)
			else:
				cur = 1
		print(ma)
__starting_point()


n = int(input())
s = list(map(int, input().split()))
d = []
count = []
for i in range(n):
	if not count:
		count.append(s[i])
	elif count[-1] < s[i] <= count[-1] * 2:
		count.append(s[i])
	else:
		d.append(len(count))
		count = [s[i]]
d.append(len(count))
print(max(d))


n = int(input())
s = list(map(int, input().split()))
ans = 0
ans2 = 0
a2 = s[0]
for i in range(1, n):
	if 2 * a2 >= s[i]:
		a2 = s[i]
		ans2 += 1
		if ans2 > ans:
			ans = ans2
	else:
		a2 = s[i]
		ans2 = 0
print(ans + 1)


n = int(input())
arry = [int(p) for p in input().split()]
mark = 1
tempmark = 1
for i in range(1, len(arry)):
	if arry[i] <= 2 * arry[i - 1]:
		tempmark += 1
	else:
		mark = max(mark, tempmark)
		tempmark = 1
mark = max(mark, tempmark)
print(mark)


n = int(input())
a = list(map(lambda x: int(x), input().split(' ')))
m = 1
k = 1
for i in range(1, n):
	if m < k:
		m = k
	if a[i] <= a[i - 1] * 2:
		k += 1
	else:
		k = 1
if m < k:
	m = k
print(m)


a = int(input())
b = [int(i) for i in input().split()]
t = []
i = 0
while i < len(b):
	j = i
	m = 1
	while j < len(b) - 1:
		if b[j + 1] <= b[j] * 2:
			j += 1
			m += 1
			i += 1
		else:
			break
	t.append(m)
	i += 1
print(max(t))


n = int(input())
a = [*map(int, input().split())]
ans = 0
j = 1
for i in range(1, n):
	if a[i] <= a[i - 1] * 2:
		j += 1
	else:
		ans = max(ans, j)
		j = 1
print(max(ans, j))


n = int(input())
a = list(map(int, input().split()))
ans = [0] * n
cnt = 1
if n == 1:
	print(1)
	exit(0)
for i in range(n - 1):
	if 2 * a[i] >= a[i + 1]:
		cnt += 1
	else:
		cnt = 1
	ans[i] = cnt
print(max(ans))


I = lambda : list(map(int, input().split()))
n = int(input())
a = I()
l = 0
ans = 1
for (i, el) in enumerate(a[1:], 1):
	if a[i - 1] * 2 < el:
		l = i
	ans = max(ans, i - l + 1)
print(ans)


class Solution(object):

	def __init__(self, arr):
		self.arr = arr

	def sol(self):
		sl = current = 0
		j = 1
		n = len(self.arr)
		while j < n:
			if self.arr[j] <= self.arr[j - 1] << 1:
				current += 1
				sl = max(sl, current)
			else:
				current = 0
			j += 1
		return sl + 1

def main():
	n = int(input())
	arr = [int(e) for e in input().split()]
	sol = Solution(arr)
	print(sol.sol())
	return 0
main()


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


n = int(input())
a = list(map(int, input().split()))
l = []
temp = 1
for i in range(n - 1):
	if a[i + 1] > 2 * a[i]:
		l.append(temp)
		temp = 1
	else:
		temp += 1
l.append(temp)
if len(l) != 0:
	print(max(l))
else:
	print(n)


def task_b(n, weight_list):
	max = 1
	curr = 1
	for i in range(1, n):
		if weight_list[i - 1] * 2 < weight_list[i]:
			if curr > max:
				max = curr
			curr = 1
		else:
			curr += 1
	if curr > max:
		max = curr
	return max
n = int(input())
weight_list = tuple(map(int, input().split()))
print(task_b(n, weight_list))


a = int(input())
b = list(map(int, input().split()))
(q, w) = (1, 1)
for j in range(a - 1):
	if b[j] * 2 >= b[j + 1]:
		q += 1
	else:
		q = 1
	w = max(q, w)
print(w)


n = int(input())
l = list(map(int, input().split()))
ans = 0
ll = []
for i in range(len(l) - 1):
	if l[i] * 2 >= l[i + 1]:
		ans += 1
	elif ans > 0:
		ans += 1
		ll.append(ans)
		ans = 0
ans += 1
ll.append(ans)
if len(ll) == 0:
	print(1)
else:
	print(max(1, max(ll)))


n = int(input().strip())
arr = list(map(int, input().strip().split()))
dp = [1] * n
for i in range(1, n):
	if arr[i] <= 2 * arr[i - 1]:
		dp[i] = dp[i - 1] + 1
print(max(dp))


n = int(input())
a = input().split()
max_length = 0
initial_index = 0

def compare(a1, a2):
	if a2 <= 2 * a1:
		return True
	else:
		return False
if n == 1:
	max_length = 1
for i in range(len(a) - 1):
	a[i] = int(a[i])
	if compare(a[i], int(a[i + 1])):
		max_length = max(i + 2 - initial_index, max_length)
	else:
		max_length = max(i + 1 - initial_index, max_length)
		initial_index = i + 1
print(max_length)


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

def solve():
	global n, a
	ans = 1
	maxx = 1
	for i in range(1, n):
		if a[i] <= 2 * a[i - 1]:
			ans += 1
			maxx = max(maxx, ans)
		else:
			ans = 1
	print(maxx)
solve()


n = int(input())
tmp = input().split()
c = 1
bak = int(tmp[0])
maxc = 1
for i in range(1, n, 1):
	if int(tmp[i]) <= 2 * int(tmp[i - 1]):
		c += 1
	else:
		c = 1
	if maxc < c:
		maxc = c
print(maxc)


import sys

def main():
	n = int(input())
	a = [int(i) for i in input().split()]
	if n == 1:
		print(1)
		return 0
	ret = 1
	(i, j) = (0, 0)
	while j < n:
		if j == n - 1 or a[j + 1] > 2 * a[j]:
			ret = max(ret, j - i + 1)
			i = j + 1
			j = i
		else:
			j += 1
	print(ret)
main()


n = int(input())
aa = list(map(int, input().split(' ')))
c = 10 ** 10
res = 0
l = 0
for a in aa:
	if a <= c * 2:
		l += 1
		res = max(res, l)
	else:
		l = 1
	c = a
print(res)


n = int(input())
diffs = list(map(int, input().split(' ')))
possible_max = ''
for (i, x) in enumerate(diffs):
	possible_max += str(x) + ' '
	if i < len(diffs) - 1 and diffs[i + 1] > x * 2:
		possible_max += ':'
possible_max = possible_max.split(':')
possible_max = [x.split(' ') for x in possible_max]
for x in possible_max:
	x.remove('')
possible_max = max([len(x) for x in possible_max])
print(possible_max)


n = int(input())
a = [int(s) for s in input().split()]
m = 1
i = 1
while i < len(a):
	count = 1
	while i < len(a):
		if a[i] <= a[i - 1] * 2:
			count += 1
		else:
			if count > m:
				m = count
			break
		i += 1
	if count > m:
		m = count
	i += 1
print(m)


n = int(input())
a = list(map(int, input().split()))
max_len = 0
cor = 1
for i in range(1, n):
	if a[i] <= a[i - 1] * 2:
		cor += 1
	else:
		if cor > max_len:
			max_len = cor
		cor = 1
print(max(cor, max_len))


n = int(input())
m = list(map(int, input().split()))
z = []
x = 1
for i in range(n - 1):
	if m[i] == m[i + 1]:
		z.append(x)
		x = 1
		continue
	if m[i] * 2 < m[i + 1]:
		z.append(x)
		x = 1
	else:
		x += 1
z.append(x)
print(max(z))


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
import random
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 list(map(int, sys.stdin.readline().split()))

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines()]

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 pe(s):
	return print(str(s), file=sys.stderr)

def main():
	n = I()
	a = LI()
	r = 1
	t = c = 0
	for b in a:
		if c * 2 >= b:
			t += 1
			if t > r:
				r = t
		else:
			t = 1
		c = b
	return r
print(main())


n = int(input())
l = list(map(int, input().split()))
s = 1
p = []
for i in range(1, n):
	if l[i] <= 2 * l[i - 1]:
		s += 1
	else:
		p.append(s)
		s = 1
p.append(s)
print(max(p))


n = int(input())
l = list(map(int, input().split()))
k = 1
max1 = 1
count = 1
temp = l[0]
while k < n:
	if l[k] > 2 * temp:
		if max1 < count:
			max1 = count
		count = 1
	else:
		count += 1
	temp = l[k]
	k += 1
if max1 < count:
	max1 = count
print(max1)


n = int(input())
a = list(map(int, input().split()))
(ans, curr) = (1, 1)
i = 0
while i < n - 1:
	if a[i + 1] <= a[i] << 1:
		curr += 1
	else:
		curr = 1
	ans = max(ans, curr)
	i += 1
print(ans)


t = int(input())
a = list(map(int, input().split()))
mlen = 0
c = 1
for i in range(1, t):
	if 2 * a[i - 1] < a[i]:
		mlen = max(mlen, c)
		c = 1
	else:
		c += 1
mlen = max(mlen, c)
print(mlen)


q = int(input())
w = input().split()
e = []
r = 0
for i in range(q - 1):
	if int(w[i]) * 2 < int(w[i + 1]):
		e.append(r + 1)
		r = 0
	else:
		r += 1
e.append(r + 1)
e.sort()
print(e[-1])


leng = int(input())
arrNum = list(map(int, input().split()))
i = 0
biggest = 1
Jbig = 0
while i <= leng - 1 and biggest != len(arrNum):
	j = i + 1
	while j <= leng - 1:
		if arrNum[j] <= arrNum[j - 1] * 2:
			Jbig += 1
			i += 1
			if Jbig + 1 >= biggest:
				biggest = Jbig + 1
		else:
			i = arrNum[j]
			if Jbig + 1 >= biggest:
				biggest = Jbig + 1
			Jbig = 0
		j += 1
print(biggest)


import sys
from bisect import bisect_left, bisect_right, insort
from collections import deque, Counter
from math import gcd, sqrt, factorial, ceil, log10, log2, floor
from itertools import permutations
from heapq import heappush, heappop, heapify
inf = float('inf')
mod = 10 ** 9 + 7

def factorial_p(n, p):
	ans = 1
	if n <= p // 2:
		for i in range(1, n + 1):
			ans = ans * i % p
	else:
		for i in range(1, p - n):
			ans = ans * i % p
		ans = pow(ans, p - 2, p)
		if n % 2 == 0:
			ans = p - ans
	return ans

def nCr_p(n, r, p):
	ans = 1
	while n != 0 or r != 0:
		(a, b) = (n % p, r % p)
		if a < b:
			return 0
		ans = ans * factorial_p(a, p) * pow(factorial_p(b, p), p - 2, p) * pow(factorial_p(a - b, p), p - 2, p) % p
		n //= p
		r //= p
	return ans

def prime_sieve(n):
	flag = n % 6 == 2
	sieve = bytearray((n // 3 + flag >> 3) + 1)
	for i in range(1, int(n ** 0.5) // 3 + 1):
		if not sieve[i >> 3] >> (i & 7) & 1:
			k = 3 * i + 1 | 1
			for j in range(k * k // 3, n // 3 + flag, 2 * k):
				sieve[j >> 3] |= 1 << (j & 7)
			for j in range(k * (k - 2 * (i & 1) + 4) // 3, n // 3 + flag, 2 * k):
				sieve[j >> 3] |= 1 << (j & 7)
	return sieve

def prime_list(n):
	res = []
	if n > 1:
		res.append(2)
	if n > 2:
		res.append(3)
	if n > 4:
		sieve = prime_sieve(n + 1)
		res.extend((3 * i + 1 | 1 for i in range(1, (n + 1) // 3 + (n % 6 == 1)) if not sieve[i >> 3] >> (i & 7) & 1))
	return res

def is_prime(n):
	if n < 5 or n & 1 == 0 or n % 3 == 0:
		return 2 <= n <= 3
	s = (n - 1 & 1 - n).bit_length() - 1
	d = n >> s
	for a in [2, 325, 9375, 28178, 450775, 9780504, 1795265022]:
		p = pow(a, d, n)
		if p == 1 or p == n - 1 or a % n == 0:
			continue
		for _ in range(s):
			p = p * p % n
			if p == n - 1:
				break
		else:
			return False
	return True

def all_factors(n):
	(small, large) = ([], [])
	for i in range(1, int(n ** 0.5) + 1, 2 if n & 1 else 1):
		if not n % i:
			small.append(i)
			large.append(n // i)
	large.reverse()
	small.extend(large)
	return small

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 = int(input())
Arr = get_array()
maxi = -1
count = 1
for i in range(1, n):
	if Arr[i] <= 2 * Arr[i - 1]:
		count += 1
	else:
		maxi = max(maxi, count)
		count = 1
print(max(maxi, count))


t = int(input())
_list = list(map(int, input().split()))
_len = len(_list)
dp = [1]
for i in range(1, t):
	if _list[i] <= 2 * _list[i - 1]:
		dp.append(dp[i - 1] + 1)
	else:
		dp.append(1)
print(max(dp))


n = int(input())
a = list(map(int, input().split()))
res = 1
cur = a[0]
count = 1
for x in a[1:]:
	if x <= 2 * cur:
		count += 1
		cur = x
	else:
		res = max(res, count)
		cur = x
		count = 1
res = max(res, count)
print(res)


n = int(input())
vals = input().split()
a = [int(val) for val in vals]
dp_with = [1] * n
dp_without = [0] * n
for i in range(1, n):
	dp_without[i] = max(dp_with[i - 1], dp_without[i - 1])
	if a[i] - 2 * a[i - 1] <= 0:
		dp_with[i] = dp_with[i - 1] + 1
	else:
		dp_with[i] = 1
print(max(dp_with[n - 1], dp_without[n - 1]))


def creating_the_contest(n, a):
	lst = []
	c = 1
	t = 0
	for x in a:
		if x <= t * 2:
			c += 1
		else:
			lst.append(c)
			c = 1
		t = x
	lst.append(c)
	return max(lst)
n = int(input())
a = map(int, input().split())
print(creating_the_contest(n, list(a)))


n = int(input())
a = [int(x) for x in input().split()]
j = 0
mx = 0
c = 0
while j < n - 1:
	if a[j + 1] <= 2 * a[j]:
		c += 1
		j += 1
	else:
		mx = max(c, mx)
		c = 0
		j += 1
mx = max(c, mx)
print(mx + 1)


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


n = int(input())
a = list(map(int, input().split()))
ans = 1
cur_cnt = 1
cur_prob = a[0]
for i in range(1, n):
	if 2 * cur_prob < a[i]:
		ans = max(ans, cur_cnt)
		cur_cnt = 1
	else:
		cur_cnt += 1
	cur_prob = a[i]
ans = max(ans, cur_cnt)
print(ans)


n = int(input())
l = list(map(int, input().split()))
count = 1
mx = 1
for i in range(1, n):
	if l[i] > 2 * l[i - 1]:
		count = 1
	else:
		count += 1
	mx = max(mx, count)
print(mx)


n = int(input())
l = [int(i) for i in input().split()]
i = 1
maxi = 1
c = 0
while i < n:
	while i < n and l[i] <= l[i - 1] * 2:
		i += 1
		c += 1
	maxi = max(maxi, c + 1)
	i += 1
	c = 0
print(maxi)


data = int(input())
inputs = list(map(int, input().split()))
s = 1
nums = [1]
for i in range(0, data - 1):
	if inputs[i] * 2 >= inputs[i + 1]:
		s = s + 1
	else:
		nums.append(s)
		s = 1
nums.append(s)
print(max(nums))


n = int(input())
a = [int(i) for i in input().split()]

def check(k):
	ans = 0
	cur = 1
	for i in range(n - 1):
		if a[i + 1] <= a[i] * 2:
			cur += 1
		else:
			ans = max(ans, cur)
			cur = 1
	ans = max(cur, ans)
	return ans
print(check(1))


n = int(input())
s = input().split()
for i in range(n):
	s[i] = int(s[i])
ans = 1
curStreak = 1
for i in range(1, n):
	if s[i] <= 2 * s[i - 1]:
		curStreak += 1
		ans = max(ans, curStreak)
	else:
		curStreak = 1
print(ans)


n = int(input())
a = [int(x) for x in input().split()]
arr = [0] * n
maxx = -1
maxcnt = 0
for i in range(n - 1):
	if 2 * a[i] >= a[i + 1]:
		arr[i] = 1
	else:
		arr[i] = 0
for i in range(n):
	if arr[i] == 1:
		maxcnt += 1
	else:
		maxx = max(maxx, maxcnt + 1)
		maxcnt = 0
print(maxx)


n = int(input())
a = [int(x) for x in input().split()]
ans = temp = 0
for x in range(n - 1):
	if a[x] * 2 >= a[x + 1]:
		temp += 1
	else:
		temp = 0
	if temp > ans:
		ans = temp
ans += 1
print(ans)


n = int(input())
nums = [int(s) for s in input().split(' ')]
max_count = 1
start = 0
while start < n - 1:
	current = nums[start]
	for end in range(start + 1, n):
		count = end - start + 1
		prev = nums[end - 1]
		last = nums[end]
		if last > 2 * prev:
			break
		elif count > max_count:
			max_count = count
	start = end
print(max_count)


import collections
d = collections.deque()
n = int(input())
a = list(map(int, input().split()))
dp = [0] * n
dp[0] = 1
pt = 0
d.append(0)
for i in range(1, n):
	while a[pt] * 2 < a[i]:
		pt += 1
	while len(d) > 0:
		if d[0] < pt:
			d.popleft()
		else:
			break
	if len(d) == 0:
		dp[i] = 1
	else:
		dp[i] = dp[d[0]] + 1
	while len(d) > 0:
		last = d[-1]
		if dp[i] >= dp[last]:
			d.pop()
	d.append(i)
ans = 0
for elem in dp:
	ans = max(elem, ans)
print(ans)


import sys
input = sys.stdin.readline
I = lambda : list(map(int, input().split()))
(n,) = I()
l = I()
an = 1
can = 1
pre = l[0]
for i in range(1, n):
	if l[i] <= 2 * pre:
		can += 1
		pre = l[i]
	else:
		an = max(an, can)
		can = 1
		pre = l[i]
an = max(an, can)
print(an)


n = int(input())
a = list(map(int, input().split()))
max_tasks = 1
i = 0
while i < n - 1:
	temp = 1
	j = i
	while j + 1 < n and a[j + 1] <= a[j] * 2:
		j += 1
		temp += 1
		max_tasks = max(max_tasks, temp)
	i = j + 1
print(max_tasks)


read = lambda : map(int, input().split())
n = int(input())
a = list(read())
cur = ans = 1
for i in range(1, n):
	if a[i - 1] * 2 < a[i]:
		cur = 1
	else:
		cur += 1
	ans = max(ans, cur)
print(ans)


n = int(input())
lst = list(map(int, input().strip().split(' ')))
l = [1] * n
if n == 1:
	print(1)
else:
	j = 0
	i = 1
	c = 0
	m = 0
	while i < n and j < n:
		if lst[i] <= lst[j] * 2:
			c += 1
		else:
			if c > m:
				m = c
			c = 0
		i += 1
		j += 1
	print(max(m + 1, 1, c + 1))


n = int(input())
initiallist = list(map(int, input().split()))
answerlist = []
maximum = 1
count = 1
max = 0
for i in range(n - 1):
	if initiallist[i] * 2 >= initiallist[i + 1]:
		answerlist.append(1)
		if len(answerlist) > max:
			max = len(answerlist)
	else:
		answerlist = []
print(max + 1)


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


a = int(input())
b = input().split()
otcount = 1
otpos = 0
otm = [1]
for i in range(1, a):
	if int(b[i]) <= int(b[i - 1]) * 2:
		otcount += 1
		otm[otpos] = otcount
	else:
		otcount = 1
		otm.append(1)
		otpos += 1
print(max(otm))


import math
n = int(input())
a = list(map(int, input().split()))
x = []
cnt = 0
j = 1
while j < n:
	k = []
	for i in range(j - 1, n - 1):
		if a[i + 1] <= 2 * a[i]:
			k.append(a[i])
			k.append(a[i + 1])
		else:
			break
	k = set(k)
	k = list(k)
	j = i + 2
	x.append(k)
maxx = 0
for i in x:
	if len(i) >= maxx:
		maxx = len(i)
if maxx == 0:
	print(1)
else:
	print(maxx)


from sys import stdin, stdout
from math import gcd, ceil, sqrt
from collections import Counter
from bisect import bisect_left, bisect_right
ii1 = lambda : int(stdin.readline().strip())
is1 = lambda : stdin.readline().strip()
iia = lambda : list(map(int, stdin.readline().strip().split()))
isa = lambda : stdin.readline().strip().split()
mod = 1000000007
n = ii1()
arr = iia()
x = res = cur = 0
for i in arr:
	if i > x * 2:
		cur = 0
	x = i
	cur += 1
	res = max(res, cur)
print(max(res, 1))


input()
diff = list(map(int, input().split()))
m = 1
cpt = 1
for k in range(1, len(diff)):
	if diff[k] <= diff[k - 1] * 2:
		cpt += 1
		m = max(cpt, m)
	else:
		cpt = 1
print(m)


def problem(in1, in2):
	n = int(in1)
	numbers = list(map(int, in2.split()))
	max_count = 1
	count = 1
	if len(numbers) == 1:
		return 1
	for (index, num) in enumerate(reversed(numbers[:-1])):
		if num * 2 >= numbers[-index - 1]:
			count += 1
		else:
			if count > max_count:
				max_count = count
			count = 1
	if count > max_count:
		max_count = count
	return max_count
in1 = input()
in2 = input()
result = problem(in1, in2)
print(result)


n = int(input())
a = [int(x) for x in input().split()]
b = []
b.append(0)
for i in range(1, n):
	if a[i] > 2 * a[i - 1]:
		b.append(i)
b.append(n)
n = len(b)
m = 1
for i in range(1, n):
	if b[i] - b[i - 1] > m:
		m = b[i] - b[i - 1]
print(m)


n = int(input())
a = map(int, input().split())
max_iter = 0
current_counter = 0
prev_a = None
for ai in a:
	if prev_a is not None:
		if prev_a * 2 < ai:
			if max_iter < current_counter:
				max_iter = current_counter
			current_counter = 0
	prev_a = ai
	current_counter += 1
if max_iter < current_counter:
	max_iter = current_counter
print(max_iter)


from collections import deque

def solve():
	n = int(input())
	arr = [int(k) for k in input().split()]
	subarr = deque([arr[0]])
	max_ = 1
	i = 1
	while i < n:
		if len(subarr) == 0 or arr[i] <= 2 * subarr[-1]:
			subarr.append(arr[i])
			i += 1
		else:
			if len(subarr) > max_:
				max_ = len(subarr)
			subarr.popleft()
	if len(subarr) > max_:
		max_ = len(subarr)
	print(max_)
solve()


def main():
	(n, l, a) = (int(input()), [], 0)
	for b in map(int, input().split()):
		if a * 2 < b:
			r = [b]
			l.append(r)
		else:
			r.append(b)
		a = b
	print(max(map(len, l)))
main()


def solution(x):
	d = [0] * len(x)
	d[0] = 1
	for k in range(1, len(x)):
		if x[k - 1] * 2 >= x[k]:
			d[k] = d[k - 1] + 1
		else:
			d[k] = 1
	return max(d)
N = int(input())
x = list(map(int, input().split()))
print(solution(x))


noe = int(input())
arr = [int(x) for x in input().split()]
pos = 0
indx = 1
m = 0
for x in arr:
	if x > 2 * pos:
		m = 1
	else:
		m += 1
		indx = max(indx, m)
	pos = x
print(indx)


n = int(input())
a = list(map(int, input().split()))
ltt2 = [a[i] <= a[i - 1] << 1 for i in range(1, n)]
(ans, cur) = (0, 0)
for i in range(n - 1):
	if ltt2[i] == 1:
		cur += 1
		ans = max(ans, cur)
	else:
		ans = max(ans, cur)
		cur = 0
print(ans + 1)


n = int(input())
v = list(map(int, input().split()))
dp = [1] * (n + 1)
for i in range(n - 1):
	if i >= n:
		break
	if v[i + 1] >= v[i] and v[i + 1] <= 2 * v[i]:
		dp[i] = dp[i - 1] + 1
ans = -100000000
for i in range(n):
	ans = max(ans, dp[i])
print(ans)


def main():
	n = int(input())
	a = list(map(int, input().split()))
	res = 0
	i = 0
	while i < n:
		j = 0
		while i + j + 1 < n and a[i + j + 1] <= a[i + j] * 2:
			j += 1
		if j > res:
			res = j
		i += j + 1
	print(res + 1)
main()


input()
li = input().split(' ')
maxProb = 1
prevNum = 0
i = 1
for dat in li:
	if prevNum * 2 >= int(dat):
		i += 1
	else:
		if i > maxProb:
			maxProb = i
		i = 1
	prevNum = int(dat)
if i > maxProb:
	maxProb = i
print(maxProb)


import sys
n = int(sys.stdin.readline())
ip = list(map(int, sys.stdin.readline().strip().split()))
op = [0] * (n - 1)
for j in range(n - 1):
	if ip[j] * 2 >= ip[j + 1]:
		op[j] = 1
c = 0
opt = []
for j in range(n - 1):
	if op[j] == 1:
		c = c + 1
	else:
		opt.append(c)
		c = 0
opt.append(c)
print(max(opt) + 1)


n = int(input())
l = [int(j) for j in input().split()]
d = [1] * n
m = 1
for i in range(1, n):
	if l[i] <= l[i - 1] * 2:
		d[i] = d[i - 1] + 1
	m = max(m, d[i])
print(m)


from collections import deque
n = int(input().rstrip())
a = list(map(int, input().rstrip().split(' ')))
maxLength = 0
i = 0
while i < n:
	j = i
	while j + 1 < n and a[j + 1] <= 2 * a[j]:
		j += 1
	maxLength = max(j - i + 1, maxLength)
	i = j + 1
print(maxLength)


import sys
input = sys.stdin.readline

def read():
	return list(map(int, input().split()))
n = int(input())
a = read()
ans = 0
last = 0
for i in range(1, n):
	if a[i - 1] * 2 < a[i]:
		ans = max(ans, i - last)
		last = i
print(max(ans, n - last))


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


import math
from decimal import *
n = int(input())
ar = list(map(int, input().split()))
cnt = 1
ans = 0
for i in range(1, n):
	if ar[i] <= ar[i - 1] * 2:
		cnt += 1
	else:
		ans = max(ans, cnt)
		cnt = 1
ans = max(ans, cnt)
print(ans)


t = int(input())
str1 = [int(x) for x in input().split()]
count = 1
ans = []
for i in range(0, len(str1) - 1):
	if str1[i + 1] <= 2 * str1[i]:
		count = count + 1
	else:
		count = 1
	ans.append(count)
if len(ans) == 0:
	print('1')
else:
	print(max(ans))


import sys, math
n = int(input())
ans = last = temp = 0
for i in list(map(int, input().split())):
	if i > 2 * last:
		ans = max(ans, temp)
		temp = 1
	else:
		temp += 1
	last = i
print(max(ans, temp))


n = int(input())
a = list(map(int, input().split()))
s = ''.join(['1' if 2 * a[i] >= a[i + 1] else '0' for i in range(n - 1)])
print(len(max(s.split('0'))) + 1)


n = int(input())
a = list(map(int, input().split()))
c = [a[0]]
cm = 1
for i in range(1, n):
	if len(c) == 0 or c[-1] * 2 >= a[i]:
		c.append(a[i])
		cm = max(cm, len(c))
	else:
		c = [a[i]]
print(cm)


from math import factorial, ceil, pow, sqrt, floor, gcd
from sys import stdin, stdout
from collections import defaultdict, Counter, deque
from bisect import bisect_left, bisect_right
n = int(stdin.readline())
l = list(map(int, stdin.readline().split()))
m = 1
shan = 1
i = j = 0
while j < n - 1:
	i = j
	if 2 * l[i] >= l[i + 1]:
		while i < n - 1 and 2 * l[i] >= l[i + 1]:
			shan += 1
			i += 1
		m = max(shan, m)
		shan = 1
		j = i
	else:
		j += 1
print(m)


import sys
sys.setrecursionlimit(200000)
n = int(input())
level = [int(i) for i in input().split()]
d = {}

def f(i):
	if not i in d:
		(l, r) = (i, n)
		c = (l + r) // 2
		while r - l > 3:
			if level[c] > level[i] * 2:
				r = c
			else:
				l = c
			c = (l + r) // 2
		while l < n and level[l] <= level[i] * 2:
			l += 1
		if l == i + 1:
			d[i] = 1
		else:
			d[i] = l - i - 1 + f(l - 1)
	return d[i]
for i in range(n):
	f(i)
print(max([d[x] for x in d]))