Let's call an array $a$ consisting of $n$ positive (greater than $0$) integers beautiful if the following condition is held for every $i$ from $1$ to $n$: either $a_i = 1$, or at least one of the numbers $a_i - 1$ and $a_i - 2$ exists in the array as well.

For example:

the array $[5, 3, 1]$ is beautiful: for $a_1$, the number $a_1 - 2 = 3$ exists in the array; for $a_2$, the number $a_2 - 2 = 1$ exists in the array; for $a_3$, the condition $a_3 = 1$ holds;

the array $[1, 2, 2, 2, 2]$ is beautiful: for $a_1$, the condition $a_1 = 1$ holds; for every other number $a_i$, the number $a_i - 1 = 1$ exists in the array;

the array $[1, 4]$ is not beautiful: for $a_2$, neither $a_2 - 2 = 2$ nor $a_2 - 1 = 3$ exists in the array, and $a_2 \ne 1$;

the array $[2]$ is not beautiful: for $a_1$, neither $a_1 - 1 = 1$ nor $a_1 - 2 = 0$ exists in the array, and $a_1 \ne 1$;

the array $[2, 1, 3]$ is beautiful: for $a_1$, the number $a_1 - 1 = 1$ exists in the array; for $a_2$, the condition $a_2 = 1$ holds; for $a_3$, the number $a_3 - 2 = 1$ exists in the array.

You are given a positive integer $s$. Find the minimum possible size of a beautiful array with the sum of elements equal to $s$.


-----Input-----

The first line contains one integer $t$ ($1 \le t \le 5000$) — the number of test cases.

Then $t$ lines follow, the $i$-th line contains one integer $s$ ($1 \le s \le 5000$) for the $i$-th test case.


-----Output-----

Print $t$ integers, the $i$-th integer should be the answer for the $i$-th testcase: the minimum possible size of a beautiful array with the sum of elements equal to $s$.


-----Examples-----

Input
4
1
8
7
42
Output
1
3
3
7


-----Note-----

Consider the example test:

in the first test case, the array $[1]$ meets all conditions;

in the second test case, the array $[3, 4, 1]$ meets all conditions;

in the third test case, the array $[1, 2, 4]$ meets all conditions;

in the fourth test case, the array $[1, 4, 6, 8, 10, 2, 11]$ meets all conditions.

Difficulty: EASY
Tags: Mathematics

Greedy algorithms
Skill types: Greedy algorithms

Starter code:

Solutions:
import math
for _ in range(int(input())):
	n = int(input())
	if n == 1:
		print(1)
	else:
		x = int(math.sqrt(n))
		if x ** 2 == n:
			print(x)
		else:
			print(x + 1)


for i in range(int(input())):
	print(int((int(input()) - 1) ** 0.5) + 1)


for _ in [0] * int(input()):
	s = int(input())
	if s == 1:
		print(1)
		continue
	for i in range(1, s // 2 + 2):
		if i * i == s:
			print(i)
			break
		elif i * i > s:
			print(i)
			break


for _ in range(int(input())):
	print(int(int(input()) ** 0.5 + 0.999))


import math
t = int(input())
for i in range(t):
	print(math.ceil(math.sqrt(int(input()))))


from math import ceil, sqrt
for _ in range(int(input())):
	print(ceil(sqrt(int(input()))))


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	s = int(input())
	x = 0
	i = 1
	ans = 0
	while x < s:
		x += i
		i += 2
		ans += 1
	print(ans)


import math
w = int(input())
l = []
for i in range(w):
	k = int(input())
	l.append(k)
for i in l:
	print(math.ceil(math.sqrt(i)))


def sol(n):
	return int((n - 1) ** 0.5) + 1
for i in range(int(input())):
	j = int(input())
	print(sol(j))


res = ''
for i in range(int(input())):
	s = int(input()) ** 0.5
	s = int(s) + (s % 1 != 0)
	res += '%d\n' % s
print(res)


def solve():
	n = int(input())
	if n == 1:
		print(1)
		return
	else:
		k = 1
		n -= k
		c = 1
		while n > 0:
			k += 2
			n -= k
			c += 1
		print(c)
t = int(input())
for _ in range(t):
	solve()


from os import path
import sys, time
from math import ceil, floor, gcd, log, log2, factorial, sqrt
from collections import defaultdict, Counter, OrderedDict, deque
from itertools import combinations, accumulate
from bisect import *
from functools import reduce
from operator import mul
star = lambda x: print(' '.join(map(str, x)))
grid = lambda r: [lint() for i in range(r)]
INF = float('inf')
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
import sys
from sys import stdin, stdout
from collections import *
from math import gcd, floor, ceil

def st():
	return list(stdin.readline().strip())

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

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

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

def solve():
	n = inp()
	c = 1
	res = 0
	while n != 0:
		n = n - c
		res += 1
		c = c + 2
		x = c + 1
		if c > n and n > 0:
			res += 1
			break
	print(res)
t = 1
t = inp()
for _ in range(t):
	solve()


from math import sqrt, ceil
n = int(input())
for _ in range(n):
	number = int(input())
	print(str(int(ceil(sqrt(number)))))


for i in range(int(input())):
	s = int(input())
	x = 1
	y = 1
	ans = 1
	while x < s:
		y += 2
		x += y
		ans += 1
	print(ans)


t = int(input())
for i in range(t):
	s = int(input())
	a = 1
	s -= 1
	if s == 0:
		print(a)
	else:
		while s > 0:
			s -= 2 * a + 1
			a += 1
		print(a)


import math
t = int(input())
l = []
for i in range(0, t):
	s = int(input())
	l.append(s)
for i in l:
	ans = math.ceil(math.sqrt(i))
	print(ans)


def testcases():
	return range(int(input()))
from math import sqrt, ceil
for t in testcases():
	print(int(ceil(sqrt(int(input())))))


import math
for _ in range(int(input())):
	n = int(input())
	print(math.ceil(math.sqrt(n)))


def fun(A):
	ans = 1
	j = 1
	k = 1
	while k < A:
		j = j + 2
		k = k + j
		ans = ans + 1
	print(ans)
a = int(input())
for _ in range(0, a):
	fun(int(input()))


def computeBeauty(s):
	cntVals = 1
	curSum = 1
	prevVal = 1
	while curSum < s:
		prevVal += 2
		curSum += prevVal
		cntVals += 1
	return cntVals

def main():
	numCases = int(input())
	for _ in range(numCases):
		s = int(input())
		print(computeBeauty(s))
main()


def solution():
	import math
	for t in range(int(input())):
		s = int(input())
		print(-int(math.sqrt(s) // -1))
	return
solution()


from math import *
t = int(input())
for i in range(t):
	n = int(input())
	print(ceil(n ** 0.5))


import math
tests = int(input())
for t in range(tests):
	answer = int(input())
	print(int(math.sqrt(answer - 1) + 1))


import os
import sys
from math import ceil, floor, sqrt, gcd, factorial
from io import BytesIO, IOBase
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 main():
	for _ in range(int(input())):
		n = int(input())
		if n == 1:
			print(1)
		else:
			c = 0
			s = int(sqrt(n))
			c += s
			n -= s ** 2
			if n == 0:
				print(c)
			elif (n - 1) % 2 != 0 or (n - 2) % 2 != 0:
				c += 1
				print(c)
			elif n == 1 or n == 2 or n == 3:
				c += 1
				print(c)
main()


import math
for _ in range(int(input())):
	print(math.ceil(int(input()) ** 0.5))


import math
t = int(input())
while t:
	t -= 1
	n = int(input())
	s = math.sqrt(n)
	print(math.ceil(s))


from math import *

def pro(s):
	ans = 1
	c = 1
	curr = 1
	while curr < s:
		c = c + 2
		curr += c
		ans += 1
	print(ans)
t = int(input())
for i in range(t):
	n = int(input())
	pro(n)


for t in range(int(input())):
	n = int(input())
	times = 0
	i = 1
	while n > 0:
		n = n - i
		i = i + 2
		times += 1
	print(times)


import sys
dp = [0]
(c, k, r) = (1, 1, 1)
for i in range(1, 5001):
	dp.append(k)
	if c == r:
		k += 1
		r += 2
		c = 0
	c += 1
for t in range(int(sys.stdin.readline())):
	s = int(sys.stdin.readline())
	print(dp[s])


def f():
	n = int(input())
	c = int(n ** 0.5) - 1
	for x in range(c, 10 ** 8):
		if x * x >= n:
			print(x)
			return
t = int(input())
while t:
	f()
	t -= 1


import math
t = int(input())
solutions = []
for i in range(t):
	s = int(input())
	solutions.append(math.ceil(s ** (1 / 2)))
for x in solutions:
	print(x)


import math
t = int(input())
while t > 0:
	s = int(input())
	k = math.floor(math.sqrt(s))
	c = k
	s -= pow(k, 2)
	k = 2 * k - 1
	while s - (k + 2) > 0:
		k += 2
		s -= k
		c += 1
	print(c if s == 0 else c + 1)
	t -= 1


import math
n = int(input())
for i in range(n):
	a = int(input())
	x = math.sqrt(a)
	if x % 1 == 0:
		print(int(x))
	else:
		print(int(x) + 1)


from math import sqrt
for s in [*open(0)][1:]:
	print(int((int(s) - 1) ** 0.5) + 1)


import math
T = int(input())
for _ in range(T):
	n = int(input())
	m = math.ceil(n ** 0.5)
	print(m)


from sys import stdin
input = stdin.readline
N = int(input())
for _ in range(N):
	M = int(input())
	for i in range(10 ** 10):
		if M <= i ** 2:
			print(i)
			break


t = int(input())
for i in range(t):
	n = int(input())
	ans = 0
	sum = 0
	i = 1
	while sum <= n:
		sum += i
		i += 2
		ans += 1
	sum -= i - 2
	if sum == n:
		print(ans - 1)
	else:
		print(ans)


for _ in range(int(input())):
	n = int(input())
	if n == 1:
		print(1)
		continue
	if n == 2:
		print(2)
		continue
	if n == 3:
		print(2)
		continue
	S = 1
	c = 1
	for i in range(3, n + 5, 2):
		if S == n:
			break
		if i + S <= n:
			S = S + i
			c += 1
		else:
			S = n
			c += 1
	print(c)


import math
t = int(input())
for _ in range(t):
	s = int(input())
	print(math.ceil(math.sqrt(s)))


for p in [*open(0)][1:]:
	print(int((int(p) - 1) ** 0.5) + 1)


def find_array(n):
	(sums, i, count) = (0, 1, 0)
	while sums < n:
		sums += i
		count += 1
		i += 2
	return count
t = int(input())
for i in range(t):
	print(find_array(int(input())))


import math
for t in range(int(input())):
	s = int(input())
	sq = int(math.sqrt(s))
	print(sq + (1 if sq * sq != s else 0))


t = int(input())
for _ in range(t):
	s = int(input())
	c = int((4 * s) ** 0.5)
	c //= 2
	if s - c ** 2 > 0:
		c += 1
	print(c)


a = int(input())
for i in range(a):
	x = int(input())
	if int(x ** 0.5) < x ** 0.5:
		print(int(x ** 0.5) + 1)
	else:
		print(int(x ** 0.5))


t = int(input())
for _ in range(t):
	s = int(input())
	i = 3
	n = 1
	while n < s:
		n += i
		i += 2
	print(i // 2)


import math

def lerp(val, lb, ub, lv, uv):
	return lv + (val - lb) * (uv - lv) / (ub - lb)

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

def get_floats():
	return list(map(float, input().split()))
for _ in range(int(input())):
	N = int(input())
	print(math.ceil(math.sqrt(N)))


t = int(input())
while t > 0:
	t -= 1
	s = int(input())
	sum = 0
	i = 1
	k = 0
	while i + sum < s:
		sum += i
		i += 2
		k += 1
	if sum == s:
		print(k)
	else:
		print(k + 1)


for _ in range(int(input())):
	n = int(input())
	add = 0
	p = 1
	ansreal = 0
	while ansreal < n:
		add = 2 * p - 1
		ansreal = ansreal + add
		p += 1
	if p == 1:
		print(p)
	else:
		print(p - 1)


t = int(input())
for _ in range(t):
	n = int(input())
	cur = 0
	ans = 0
	for i in range(1, 1000000, 2):
		if cur + i > n:
			break
		ans += 1
		cur += i
	if cur == n:
		print(ans)
	else:
		print(ans + 1)


import math

def Solve():
	s = int(input())
	x = 1
	S = 0
	dem = 0
	while S < s:
		if S + x >= s:
			dem += 1
			break
		dem += 1
		S += x
		x += 2
	print(dem)
q = int(input())
while q > 0:
	Solve()
	q -= 1


import sys

def ints():
	return list(map(int, sys.stdin.readline().strip().split()))
tc = int(input())
while tc:
	tc -= 1
	n = int(input())
	ans = n ** 0.5
	if ans > int(ans):
		ans = int(ans) + 1
	else:
		ans = int(ans)
	print(ans)


from sys import stdin, stdout
import math
from collections import defaultdict as df, deque
from heapq import merge, heapify, heappop, heappush, nsmallest
from bisect import bisect_left as bl, bisect_right as br, bisect
mod = pow(10, 9) + 7
mod2 = 998244353
S1 = 'abcdefghijklmnopqrstuvwxyz'
S2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

def nCr(n, r, mod):
	if r < 0 or r > n:
		return 0
	ans = 1
	for i in range(1, r + 1):
		ans = ans * (n - i + 1) // i
	return ans % mod

def SieveOfEratosthenes(n):
	l = []
	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
	for p in range(2, n + 1):
		if prime[p]:
			l.append(p)
	return l

def isprime(x):
	if x <= 1:
		return False
	if x in (2, 3):
		return True
	if x % 2 == 0:
		return False
	for i in range(3, int(sqrt(x)) + 1, 2):
		if x % i == 0:
			return False
	return True
a = [1, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142]
for _ in range(int(input())):
	n = int(input())
	print(math.ceil(math.sqrt(n)))


from math import ceil, sqrt
for qq in range(int(input())):
	print(ceil(sqrt(int(input()))))


for iii in range(int(input())):
	n = int(input())
	for i in range(1000000):
		if i * i >= n:
			print(i)
			break


for q in [*open(0)][1:]:
	print(int((int(q) - 1) ** 0.5) + 1)


import sys
from math import factorial, gcd
from collections import Counter, deque, defaultdict
from bisect import bisect_left, bisect_right
from heapq import heappop, heappush, heapify, nlargest, nsmallest
from itertools import groupby
from copy import deepcopy
MOD = 1000000007
INF = float('inf')
rl = lambda : list(map(int, sys.stdin.readline().split()))
rs = lambda : sys.stdin.readline().strip()
for _ in range(int(input())):
	n = int(input())
	count = 0
	cur = 1
	while cur < n:
		count += 1
		n -= cur
		cur += 2
	print(count + 1)


import math
tc = int(input())
for _ in range(tc):
	i = int(input())
	print(math.ceil(math.sqrt(i)))


import math
t = int(input())
for i in range(t):
	ans = int(input())
	print(int(math.sqrt(ans - 1) + 1))


from math import ceil
for _ in range(int(input())):
	n = int(input())
	print(ceil(n ** (1 / 2)))


import math
for i in range(int(input())):
	a = int(input())
	if (math.sqrt(a) // 1) ** 2 == a:
		print(int(math.sqrt(a)))
	else:
		print(int(math.sqrt(a) // 1 + 1))


for s in [*open(0)][1:]:
	print(int((int(s) - 0.1) ** 0.5) + 1)


from collections import Counter as count
from bisect import bisect
import sys
from math import ceil, gcd
from itertools import groupby
input = lambda : sys.stdin.readline().rstrip('\r\n')
for i in range(int(input())):
	n = int(input())
	ans = 0
	i = 1
	t = 0
	while n > ans:
		ans += i
		i += 2
		t += 1
	print(t)


t = int(input())
for _ in range(t):
	s = int(input())
	sum = 1
	last_item = 1
	res = 1
	while sum < s:
		last_item += 2
		sum += last_item
		res += 1
	print(res)


for i in range(int(input())):
	s = int(input())
	ans = 0
	x = 1
	while s - x >= 0:
		s -= x
		ans += 1
		x += 2
	print(ans if not s else ans + 1)


import math, sys, itertools
wtf = sys.stdin.read()
wtf = wtf.strip().split('\n')
gg = [0] * 5001
gg[1] = 1
k = 2
n = 3
j = 2
while k < 5001:
	gg[k:k + n] = [j] * n
	k += n
	n += 2
	j += 1
for t in wtf[1:]:
	print(gg[int(t)])


import sys
from os import path
import collections
from collections import defaultdict
import math
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
test = int(sys.stdin.readline().rstrip())
p = -1
while test > 0:
	test -= 1
	n = int(sys.stdin.readline().rstrip())
	i = 1
	if n == 1:
		print(i)
	else:
		s = c = 0
		while s < n:
			c += 1
			s += i
			i += 2
		print(c)


def solve():
	a = int(input())
	q = 1
	ans = 1
	t = q
	while 1:
		if q >= a:
			return ans
		t += 2
		q += t
		ans += 1
t = int(input())
ans = []
while t:
	ans.append(str(solve()))
	t -= 1
print('\n'.join(ans))


import sys, math

def solve(n):
	return math.ceil(n ** 0.5)
for _ in '_' * int(input()):
	print(solve(int(input())))


import time, math

def main():
	t = i_input()
	for tt in range(t):
		s = i_input()
		print(int(math.ceil(s ** 0.5)))

def i_input():
	return int(input())

def l_input():
	return input().split()

def li_input():
	return list(map(int, l_input()))

def il_input():
	return list(map(int, l_input()))
TT = time.time()
main()


import math
h = int(input())
for _ in range(h):
	a = int(input())
	b = a ** 0.5
	print(math.ceil(b))


a = int(input())
for i in range(a):
	b = int(input())
	count = 1
	k = 1
	c = 1
	while c < b:
		k = k + 2
		c = c + k
		count = count + 1
	print(count)


from math import ceil, floor, sqrt

def main():
	import sys
	input = sys.stdin.readline
	for _ in range(int(input())):
		n = int(input())
		d = 1 + 4 * (n - 1)
		print(1 + round((-1 + sqrt(d)) / 2))
main()


import math

def solve(n):
	ans = math.ceil(math.sqrt(n))
	print(ans)
	return
T = int(input())
while T:
	n = int(input())
	solve(n)
	T -= 1


for _ in range(int(input())):
	s = int(input())
	res = 1
	i = 1
	while res < s:
		res = i * i
		i += 1
	if s == 1:
		print(1)
	else:
		print(i - 1)


import sys
import math
from collections import deque, Counter
int1 = lambda x: int(x) - 1
inp = lambda : int(input())
mi = lambda : map(int, input().split())
li = lambda : list(mi())
mi1 = lambda : map(int1, input().split())
li1 = lambda : list(mi1())
mis = lambda : map(str, input().split())
lis = lambda : list(mis())
pr = print
from collections import defaultdict
mod = 10 ** 9 + 7
Mod = 998244353
INF = 10 ** 18
ans = 0
t = inp()
for _ in range(t):
	n = inp()
	x = math.sqrt(n) + 1e-07
	if int(x) ** 2 == n:
		print(int(x))
	else:
		print(int(x) + 1)


for _ in range(int(input())):
	S = 1
	s = 1
	i = 1
	a = int(input())
	while S < a:
		s += 2
		S += s
		i += 1
	print(i)


for _ in range(int(input())):
	x = int(input())
	count = 1
	x -= 1
	if x == 0:
		print(count)
		continue
	if x == 2:
		print('2')
		continue
	if x == 3:
		print('2')
		continue
	for i in range(3, 5000, 2):
		if x <= 0:
			break
		x -= i
		count += 1
	print(count)


t = int(input())
for u in range(t):
	(dem, n, i, s) = (0, int(input()), 1, 0)
	while s < n:
		(dem, s, i) = (dem + 1, s + i, i + 2)
	print(dem)


for i in range(int(input())):
	k = int(input())
	if int(k ** 0.5) ** 2 == k:
		print(int(k ** 0.5))
	else:
		print(int(k ** 0.5) + 1)


import math

def findTheArray(number):
	value = int(math.sqrt(number))
	if value * value == number:
		return value
	return value + 1

def main():
	numberOfTestCases = int(input())
	numbers = []
	for i in range(0, numberOfTestCases, 1):
		numbers.append(int(input()))
	for number in numbers:
		print(findTheArray(number))
main()


ans = [0]
j = 1
for i in range(1, 5001):
	while j * j < i:
		j += 1
	ans.append(j)
for _ in range(int(input())):
	s = int(input())
	print(ans[s])


import sys

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

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

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

def sumodd(x):
	return x ** 2
t = get_num()
for i in range(t):
	s = get_num()
	count = 0
	if s == 1:
		print(1)
	elif s == 2:
		print(2)
	elif s == 3:
		print(2)
	else:
		j = 1
		while sumodd(j) <= s:
			count += 1
			sum = sumodd(j)
			j += 1
		if sum == s:
			print(count)
		else:
			print(count + 1)


def solve(s, ans):
	arr = [1]
	s -= 1
	while s > 0:
		if arr[-1] + 2 <= s:
			arr.append(arr[-1] + 2)
			s -= arr[-1]
		else:
			break
	if s:
		arr.append(s)
	ans.append(str(len(arr)))

def main():
	t = int(input())
	ans = []
	for i in range(t):
		s = int(input())
		solve(s, ans)
	print('\n'.join(ans))
main()


t = int(input())
for i in range(t):
	s = int(input())
	cur = 1
	a = 1
	b = 1
	while cur < s:
		a += 2
		cur += a
		b += 1
	print(b)


from math import sqrt, ceil
i = int(input())
for a in range(i):
	c = int(input())
	d = ceil(sqrt(c))
	print(d)


t = int(input())
while t:
	sum = int(input())
	n = 1
	tot = 1
	sz = 1
	while tot < sum:
		n += 2
		tot += n
		sz += 1
	print(sz)
	t -= 1


import collections
for _ in range(int(input())):
	n = int(input())
	if n == 1:
		print(1)
		continue
	s = 1
	i = 3
	c = 1
	while s < n:
		s += i
		i += 2
		c += 1
	print(c)


import math
t = int(input())
for i in range(t):
	print(math.ceil(pow(int(input()), 0.5)))


t = int(input())
test_cases = [int(input()) for _ in range(t)]
for test_case in test_cases:
	sum_ = 1
	length = 1
	while sum_ < test_case:
		sum_ += sum_ ** (1 / 2) * 2 + 1
		length += 1
	print(length)


import sys
tokens = ''.join(sys.stdin.readlines()).split()[::-1]

def next():
	return tokens.pop()

def nextInt():
	return int(next())

def nextFloat():
	return float(next())

def getIntArray(n):
	return [nextInt() for _ in range(n)]

def getFloatArray(n):
	return [nextFloat() for _ in range(n)]

def getStringArray(n):
	return [next() for _ in range(n)]
flush = sys.stdout.flush
import math
for tc in range(nextInt()):
	S = nextInt()
	sqrt = int(math.sqrt(S))
	while sqrt * sqrt < S:
		sqrt += 1
	print(sqrt)


import math
t = int(input())
for mikasa in range(t):
	s = int(input())
	ans = math.sqrt(s)
	if ans != int(ans):
		print(int(ans + 1))
	else:
		print(int(ans))


import math
t = int(input())
while t > 0:
	s = int(input())
	ans = math.sqrt(s)
	print(math.ceil(ans))
	t -= 1


test_cases = int(input())
for test_case in range(test_cases):
	N = int(input())
	s = 0
	count = 0
	for no in range(1, 5000, 2):
		if s + no < N:
			s += no
			count += 1
		else:
			s += N - s
			count += 1
			break
	print(count)


t = int(input())
group = []
for i in range(t):
	n = int(input())
	group.append(n)
for num in group:
	if num == 1:
		print(1)
	elif int(num ** (1 / 2)) == num ** (1 / 2):
		print(int(num ** (1 / 2)))
	else:
		print(int(num ** (1 / 2)) + 1)


import math

def getint():
	L = [int(i) for i in input().split()]
	if len(L) == 1:
		return L[0]
	return L

def getstr():
	return [str(i) for i in input().split()]

def solve():
	n = int(input())
	ans = math.ceil(n ** 0.5)
	print(ans)
for _ in range(int(input())):
	solve()


import math

def solve(Test_cases):
	Resultant_list = []
	for i in range(Test_cases):
		N = int(input())
		if N < 1 or N > 5000:
			exit()
		sum = int(0)
		x = int(1)
		c = 0
		while sum < N:
			sum += x
			x += 2
			c += 1
		Resultant_list.append(c)
	return Resultant_list
Test_cases = int(input())
if Test_cases < 1 or Test_cases > 5000:
	exit()
Answer = solve(Test_cases)
for i in Answer:
	print(i)


for _ in range(int(input())):
	s = int(input())
	sum = 0
	count = 0
	i = 1
	while sum < s:
		sum += i
		i += 2
		count += 1
	print(count)


for i in range(int(input())):
	n = int(input())
	cnt = 1
	ans = 0
	while n >= cnt:
		ans += 1
		n -= cnt
		cnt += 2
	cnt -= 1
	while n > 0 and cnt >= 1:
		if cnt <= n:
			ans += 1
			n -= cnt
		cnt -= 1
	ans += n
	print(ans)


t = int(input())
for i in range(t):
	inp = int(input())
	(res, sm, inc) = (0, 0, 1)
	while sm < inp:
		sm += inc
		inc += 2
		res += 1
	print(res)


def max_sum(x):
	return x ** 2

def ans(x):
	res = 1
	while max_sum(res) < x:
		res += 1
	return res
t = int(input())
for i in range(t):
	print(ans(int(input())))


import math
for i in range(int(input())):
	s = int(input())
	print(math.ceil(math.sqrt(s)))


n = int(input())
for i in range(0, n):
	a = int(input())
	a = a - 1
	print(int((a ** 0.5 + 1) // 1))


import math
import sys
input = sys.stdin.readline
T = int(input())
for _ in range(T):
	n = int(input())
	print(int(math.sqrt(n - 1)) + 1)


results = []
data = []
for i in range(int(input())):
	data.append(int(input()))
for a in data:
	if a == 1:
		results.append(1)
	else:
		res = [1]
		sum = 1
		i = 1
		k = 2
		while sum + i + k < a:
			new_number = i + k
			res.append(new_number)
			sum += new_number
			i = new_number
		res.append(a - sum)
		results.append(len(res))
for i in results:
	print(i)


for i in range(int(input())):
	s = int(input())
	k = 1
	while True:
		if k ** 2 >= s:
			break
		k += 1
	print(k)


def solve():
	s = int(input())
	cnt = 0
	j = 0
	i = 1
	while s > j:
		cnt += 1
		j += i
		i += 2
	if s - j > 0:
		cnt += 1
	print(cnt)
for _ in range(int(input())):
	solve()


from math import sqrt
for _ in range(int(input())):
	n = int(input())
	if n == 1:
		print(1)
	else:
		s = int(sqrt(n))
		if s * s == n:
			print(s)
		else:
			print(s + 1)


num = int(input())
for _ in range(num):
	n = int(input())
	ls = []
	sum = 0
	val = 1
	for i in range(1, n + 1):
		sum += val
		ls.append(val)
		if sum >= n:
			break
		val += 2
	print(len(ls))


t = int(input())
import math
for i in range(t):
	j = int(input())
	y = math.sqrt(j)
	if y == int(y):
		print(int(y))
	else:
		print(int(y) + 1)


import math
t1 = int(input())
an = []

def so(t):
	p1 = math.sqrt(t)
	if p1 == int(p1):
		return int(p1)
	else:
		return int(p1) + 1
for x in range(t1):
	t = int(input())
	an.append(so(t))
for y in an:
	print(y)


def solve(t_id):
	n = int(input())
	ans = 0
	k = 1
	s = 0
	while s < n:
		s += k
		k += 2
		ans += 1
	print(ans)
t = 1
t = int(input())
for i in range(t):
	solve(i + 1)


import bisect
for _ in range(int(input())):
	s = int(input())
	ans = [1]
	s = s - 1
	while s:
		if ans[-1] + 2 <= s:
			s -= ans[-1] + 2
			ans.append(ans[-1] + 2)
		elif ans[-1] + 1 <= s:
			s -= ans[-1] + 1
			ans.append(ans[-1] + 1)
		else:
			ans.append(s)
			s = 0
	print(len(ans))


import math
t = int(input())
ans = list()
for i in range(t):
	k = int(input())
	root = int(math.sqrt(k - 1))
	ans.append(root + 1)
for i in ans:
	print(i)


T = int(input())
for _ in range(T):
	S = int(input())
	(a, count) = (1, 0)
	while S > 0:
		S -= a
		count += 1
		a += 2
	print(count)


from __future__ import division, print_function
import os
import 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 main():
	pass
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')
main()
from os import path
import bisect
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output1.txt', 'w')
from heapq import heappop, heappush, heapify
from math import ceil, log
from collections import defaultdict, deque
maxi = sys.maxsize
mini = -maxi
mod = 998244353
for _ in range(int(input())):
	s = int(input())
	(i, j, n) = (1, 3, 1)
	while i < s:
		i += j
		j += 2
		n += 1
	print(n)


T = int(input())
w = [1]
ww = [1]
for i in range(1, 5005):
	w.append(w[i - 1] + 2)
	ww.append(w[i] + ww[i - 1])
for case in range(0, T):
	n = int(input())
	for i in range(0, 5000):
		if ww[i] >= n:
			print(i + 1)
			break


for _ in range(int(input())):
	print(-int(-int(input()) ** 0.5 // 1))


n = int(input())
for _ in range(n):
	s = int(input())
	print(int(-(-s ** 0.5 // 1)))


import math
t = int(input())
while t:
	t -= 1
	s = int(input())
	print(math.ceil(pow(s, 0.5)))


import math
for t in range(int(input())):
	n = int(input())
	print(math.ceil(math.sqrt(n)))


from sys import *
t = int(stdin.readline())
for T in range(t):
	n = int(stdin.readline())
	a = 1
	while a * a < n:
		a += 1
	stdout.write(str(a) + '\n')


from math import sqrt, ceil

def main():
	for _ in range(int(input())):
		s = int(input())
		print(ceil(sqrt(s)))
main()


f = int(input())
for _ in range(f):
	n = int(input())
	s = 1
	x = 1
	o = 1
	while n > s:
		x += 2
		s += x
		o += 1
	print(o)


from math import ceil
tt = int(input())
for _ in range(tt):
	n = int(input())
	ans = 1
	while ans * ans < n:
		ans += 1
	print(ans)


import sys
from math import *
from functools import *
for _ in range(int(input())):
	s = int(input())
	print(int(sqrt(s))) if int(sqrt(s)) == sqrt(s) else print(int(sqrt(s)) + 1)


t = int(input())
while t:
	t -= 1
	n = int(input())
	ans = [x for x in range(1, 200, 2)]
	for i in range(1, len(ans)):
		ans[i] += ans[i - 1]
	for i in range(len(ans)):
		if n <= ans[i]:
			print(i + 1)
			break


from bisect import bisect_left, bisect_right
t = int(input())
arr = [1]
for i in range(3, 5000, 2):
	arr.append(arr[-1] + i)
for i in range(t):
	s = int(input())
	x = bisect_left(arr, s)
	print(x + 1)


from __future__ import division, print_function
import os
import 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
MOD = 10 ** 9 + 7
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')
import math

def main():
	for _ in range(int(input())):
		print(math.ceil(int(input()) ** 0.5))
main()


for _ in range(int(input())):
	n = int(input())
	ans = 0
	tp = 0
	i = 1
	while True:
		ans += i
		tp += 1
		if ans == n:
			break
		elif ans > n:
			ans -= i
			break
		i += 2
	print(tp)


for _ in range(int(input())):
	x = int(input())
	cnt = 0
	while cnt * cnt < x:
		cnt += 1
	print(cnt)


from math import ceil, sqrt

def solve(n):
	return ceil(sqrt(n))
for _ in range(int(input())):
	n = int(input())
	print(solve(n))


import math
res = []
for _ in range(int(input())):
	s = int(input())
	res.append(str(math.ceil(math.sqrt(s))))
print('\n'.join(res))


from __future__ import division, print_function
import math
import sys
import os
from io import BytesIO, IOBase
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')

def inp():
	return int(input())

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

def insr():
	s = input().strip()
	return list(s[:len(s)])

def invr():
	return map(int, input().split())
for _ in range(inp()):
	n = inp()
	if int(n ** 0.5) == n ** 0.5:
		print(int(n ** 0.5))
	else:
		print(int(n ** 0.5) + 1)


import math
t = int(input())
for __ in range(t):
	n = int(input())
	x = math.sqrt(n)
	if int(x) == x:
		print(int(x))
	else:
		print(int(x) + 1)


for _ in range(int(input())):
	n = int(input())
	ans = 0
	i = 1
	while 1:
		ans += 1
		n -= i
		if n <= 0:
			break
		i += 2
	print(ans)


t = int(input())
for x in range(t):
	i = int(input())
	count = 0
	ans = 0
	for y in range(1, i + 2, 2):
		ans = ans + y
		count = count + 1
		if ans == i:
			print(count)
			break
		elif i <= ans:
			print(count)
			break


t = int(input())
ans = []
for i in range(t):
	s = int(input())
	cur = 1
	s -= 1
	ch = 1
	d = set()
	d.add(1)
	while s >= ch + 2:
		ch += 2
		s -= ch
		d.add(ch)
		cur += 1
	if s != 0:
		cur += 1
	ans.append(cur)
for i in ans:
	print(i)


import math
import os
import random
import re
import sys
t = int(input())
for i in range(t):
	a = []
	k = 1
	p = 1
	n = int(input())
	while n > k:
		n = n - k
		k += 2
		p += 1
	print(p)


t = int(input())
for test in range(t):
	d = int(input())
	k = int(d ** 0.5)
	r = d - k * k
	if r != 0:
		k += 1
	print(k)


def readInteger():
	return int(input())

def readString():
	return input()

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

def readMultipleIntegersList():
	return list(readMultipleIntegers())

def readMultipleWordsInStringList():
	return list(input().split())

def charToInt(c):
	return ord(c)

def intToChar(x):
	return chr(x)

def lowerCaseAlphabetsList():
	temp = [chr(i) for i in range(97, 123)]
	return temp

def upperCaseAlphabetsList():
	temp = [chr(i) for i in range(65, 91)]
	return temp

def listToDictionary(l):
	d = {}
	for i in l:
		if i not in d:
			d[i] = 1
	return d

def listToSet(l):
	return set(l)

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

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

def solve(s):
	count = 2
	sm = 4
	i = 5
	while sm < s:
		if sm + i <= s or sm + i - 1 <= s:
			sm += i
			i += 2
			count += 1
		else:
			i -= 2
	return count
for _ in range(readInteger()):
	s = readInteger()
	if s == 1:
		print(1)
		continue
	if s < 4:
		print(2)
		continue
	print(solve(s))


for m in [*open(0)][1:]:
	print(int((int(m) - 1) ** 0.5) + 1)


for res in [*open(0)][1:]:
	print(int((int(res) - 1) ** 0.5) + 1)


t = int(input())
for _ in range(t):
	n = int(input())
	for i in range(1, 73):
		if i * i >= n:
			print(i)
			break


import math
import os
import sys
from math import *
from io import BytesIO, IOBase
from collections import *
from bisect import *
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 prog_name():
	n = int(input())
	cnt = 1
	ind = 1
	s = ind
	while n > s:
		cnt += 1
		ind += 2
		s += ind
	print(cnt)

def main():
	T = int(input())
	for unique in range(T):
		prog_name()
main()


t = int(input())
for i in range(t):
	s = int(input())
	if int(s ** 0.5) ** 2 == s:
		print(int(s ** 0.5))
	else:
		print(int(s ** 0.5) + 1)


t = int(input())
for _ in range(t):
	n = int(input())
	sm = 1
	cnt = 1
	if n == 1:
		print(1)
	elif n == 2 or n == 3:
		print(2)
	else:
		for i in range(3, n * 2, 2):
			if sm + i < n:
				sm += i
				cnt += 1
			else:
				print(cnt + 1)
				break


import math

def solve():
	s = int(input())
	if s == 1:
		return 1
	temp = math.floor(math.sqrt(s))
	if temp * temp == s:
		return temp
	else:
		return temp + 1
t = int(input())
for i in range(t):
	print(solve())


a = []
t = int(input())
for t in range(t):
	a.append(int(input()))
for i in a:
	b = 1
	while i > b * b:
		b += 1
	print(b)


for g in [*open(0)][1:]:
	g = int(g)
	r = int(g ** 0.5)
	print(r + (g > r * r))


import math
t = int(input())
while t:
	temp = int(input())
	print(math.ceil(math.sqrt(temp)))
	t -= 1


import math
t = int(input())
mod = 10 ** 9 + 7
while t:
	t -= 1
	n = int(input())
	if n == 1:
		print(1)
	else:
		print(int(math.ceil(math.sqrt(n))))


t = int(input())
for _ in range(t):
	s = int(input())
	currsum = 0
	arr = []
	while currsum != s:
		diff = s - currsum
		if currsum == 0:
			arr.append(1)
		elif diff <= 2 or diff - 2 in arr or diff - 1 in arr:
			arr.append(diff)
		else:
			max_ = max(arr)
			if max_ + 2 <= diff:
				arr.append(max_ + 2)
			else:
				arr.append(max_ + 1)
		currsum = sum(arr)
	print(len(arr))


for i in range(int(input())):
	s = int(input())
	k = int(s ** (1 / 2))
	if k ** 2 == s:
		print(k)
	else:
		print(k + 1)


import math

def calculate(number):
	return math.ceil(math.sqrt(int(number)))
data = input()
data = int(data)
result = []
for i in range(1, data + 1):
	result.append(calculate(input()))
for i in range(0, len(result)):
	print(result[i])


for _ in range(int(input())):
	n = int(input())
	cnt = 0
	s = 0
	i = 1
	while s < n:
		s += i
		cnt += 1
		i += 2
	print(cnt)


import collections
for _ in range(int(input())):
	n = int(input())
	s = 1
	i = 3
	counter = 1
	while s < n:
		s += i
		i += 2
		counter += 1
	print(counter)


import math
for t in range(int(input())):
	n = int(input())
	r = math.sqrt(n)
	if r == math.floor(r):
		print(int(r))
	else:
		print(math.floor(r) + 1)


import bisect
ans = [1, 3]
while len(ans) < 5005:
	ans.append(ans[-1] + 2)
for i in range(1, 5005):
	ans[i] += ans[i - 1]
for _ in range(int(input())):
	s = int(input())
	print(bisect.bisect_left(ans, s) + 1)


def Sum(x):
	return x * x

def max_no_of_elements(x):
	no = 1
	while Sum(no) < x:
		no += 1
	return no
a = int(input())
for i in range(a):
	x = int(input())
	print(max_no_of_elements(x))


from math import sqrt, ceil
for i in range(int(input())):
	n = int(input())
	print(ceil(sqrt(n)))


def calc():
	s = int(input())
	i = 0
	ss = 0
	while ss < s:
		ss += 2 * i + 1
		i += 1
	print(i)
t = int(input())
for _i in range(t):
	calc()


import math
t = int(input())
for x in range(t):
	i = int(input())
	ans = i ** 0.5
	print(math.ceil(ans))


t = int(input())
for k in range(t):
	s = int(input())
	sumi = 0
	c = 0
	for i in range(1, 5000, 2):
		sumi += i
		c += 1
		if sumi >= s:
			print(c)
			break


def ret(n):
	if n == 1:
		return 1
	for i in range(n + 1):
		if i * i > n - 1:
			break
	return i
for _ in range(int(input())):
	n = int(input())
	print(ret(n))


import math
for i in range(int(input())):
	a = int(input())
	print(math.ceil(math.sqrt(a)))


import sys, math

class point:
	(x, y) = (0.0, 0.0)
MOD = 10 ** 9 + 7
for _ in range(int(input())):
	n = int(input())
	print(math.ceil(n ** 0.5))


t = int(input())
while t:
	t = t - 1
	n = int(input())
	count = 0
	res = 0
	i = 1
	while res < n:
		res += i
		count += 1
		i += 2
	print(count)


import time
from queue import Queue
from itertools import accumulate
from io import BytesIO, IOBase
from itertools import combinations
import threading
from collections import deque
from functools import reduce, cmp_to_key
import sys
from math import sqrt
import heapq
import random
import math
from collections import defaultdict
from collections import Counter
import io
import os
import bisect
from fractions import Fraction

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

def iinput():
	return int(input())

def tinput():
	return input().split()

def rinput():
	return map(int, tinput())

def rlinput():
	return list(rinput())
mod = int(1000000000.0) + 7

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

def swap(arr, a, b):
	(arr[a], arr[b]) = (arr[b], arr[a])
for _ in range(iinput()):
	s = iinput()
	ans = []
	val = 1
	ans = 0
	while s:
		if s - val >= 0:
			ans += 1
			s -= val
			val += 2
		else:
			ans += 1
			s = 0
	print(ans)


k = []
for _ in range(int(input())):
	n = int(input())
	t = int(n ** (1 / 2))
	if t * t == n:
		k.append(t)
	else:
		k.append(t + 1)
for i in k:
	print(i)


for _ in range(int(input())):
	n = int(input())
	cur = 1
	s = 1
	k = 1
	while s < n:
		cur += 2
		s += cur
		k += 1
	print(k)


n = int(input())
for k in range(n):
	l = int(input())
	for i in range(1, 5000):
		r = i * i
		if r >= l:
			print(i)
			break


import heapq, math
from collections import defaultdict, deque
from os import getcwd
import sys
import sys, os.path
if os.path.exists('D:\\CP\\programs\\input.txt'):
	sys.stdout = open('D:\\CP\\programs\\output.txt', 'w')
	sys.stdin = open('D:\\CP\\programs\\input.txt', 'r')
input = sys.stdin.readline
test = int(input())
for _ in range(test):
	n = int(input())
	print(math.ceil(math.sqrt(n)))


import sys
import math
import bisect
import heapq
from bisect import bisect_right
from sys import stdin, stdout

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

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

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

def get_list_of_list(n):
	return [list(map(int, sys.stdin.readline().strip().split())) for _ in range(n)]

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

def myceil(x, y):
	return (x + y - 1) // y

def Solution(s):
	ans = 0
	if s == 1:
		print(1)
		return
	if s == 2:
		print(2)
		return
	t = 3
	s2 = 1
	ans = 1
	while s > s2:
		s2 += t
		t += 2
		ans += 1
	print(ans)

def main():
	for _ in range(get_int()):
		Solution(get_int())
main()


for _ in range(0, int(input())):
	c = 1
	v = int(input())
	t = 1
	while c < v:
		c += t * 2 + 1 if v >= c + 2 else v - c
		t += 1
	print(t)


import math

def process(t):
	return int(math.ceil(t ** 0.5))
n = int(input())
for i in range(n):
	t = int(input())
	print(process(t))


import traceback
import os
import sys
from io import BytesIO, IOBase
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 = IOWrapper(sys.stdin)
input = lambda : sys.stdin.readline().rstrip('\r\n')
import math
from collections import defaultdict as dfd, Counter
from functools import lru_cache
from itertools import accumulate

def geti():
	return int(input())

def gets():
	return input()

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

def getsl():
	return input().split()

def getinps(s):
	inps = s.split()
	m = {'i': geti, 's': gets, 'il': getil, 'sl': getsl}
	if len(inps) == 1:
		return m[s]()
	return [m[k]() for k in inps]

def get2d(nrows, ncols, n=0):
	return [[n] * ncols for r in range(nrows)]

def get_acc(a):
	return list(accumulate(a))

def get_ncr(n, r, mod=10 ** 9 + 7):
	num = den = 1
	r = min(r, n - r)
	for i in range(r):
		num = num * (n - i) % mod
		den = den * (i + 1) % mod
	return num * pow(den, mod - 2, mod) % mod

def get_nc2(n):
	return n * (n - 1) // 2

def get_npr(n, r):
	if n < r:
		return 0
	return math.factorial(n) // math.factorial(r)

def put(a):
	return ' '.join(map(str, a))
inf = float('inf')
mod = 10 ** 9 + 7

def main():
	s = getinps('i')
	tot = 0
	n = 1
	cnt = 0
	while tot < s:
		tot += n
		n += 2
		cnt += 1
	return cnt
try:
	Test = geti()
	answers = []
	for _ in range(Test):
		ans = main()
		ans = str(ans)
		answers.append(ans)
	print('\n'.join(answers))
except Exception as e:
	print(e)
	traceback.print_exc()


for _ in range(int(input())):
	n = int(input())
	r = int(n ** 0.5)
	if r * r == n:
		print(r)
	else:
		print(r + 1)


import math

def s1():
	t = int(input())
	arr = []
	i = 1
	for i in range(t):
		s = int(input())
		arr.append(math.ceil(s ** 0.5))
	for el in arr:
		print(el)
s1()


import math
size = int(input())
tests = []
out = []
for _ in range(size):
	input1 = int(input())
	tests.append(input1)
for x in range(len(tests)):
	b = math.sqrt(tests[x])
	out.append(math.ceil(b))
for a in out:
	print(a)


import math
t = int(input())
for k in range(t):
	s = int(input())
	print(math.ceil(s ** 0.5))


for i in range(int(input())):
	n = int(input())
	a = round(n ** 0.5)
	if a ** 2 < n:
		print(a + 1)
	else:
		print(a)