See Russian Translation

After a long term relationship, Anandi and Jagdish decided to marry. Anandi being a studious girl decided to complete her studies first. What next, she comes to ABC Public School. Her classes haven't even started yet and Jagdish becomes restless, comes to her college and asks her to complete her studies as soon as possible. Here comes the twist.

Anandi has to attend N classes in total. On the first day, she couldn't attend more than one class as she was too exhausted from the Semester Registration process. If Anandi takes x classes on some day, then she can take x, x-1 or x+1 classes on the next day. Jagdish on the other hand has asked Anandi to take no more than one class on the final day of her course so that she wouldn't be too tired for the marriage ceremony.

Help Anandi calculate the minimum number of days required to complete her course, keeping in mind the conditions mentioned above.

Input :

The first line contains an integer T denoting the number of test cases.

Each of the next T lines contain an integer N.

Output :

T lines :  Minimum number of days required for each test case. 

Constraints

1 ≤ N ≤ 10^9

1 ≤ T ≤ 1000

SAMPLE INPUT
3
4
1
9 

SAMPLE OUTPUT
3
1
5 

Explanation

Case 1 :  1 + 2 + 1

Case 2 : 1

Case 3 : 1 + 2 + 3 + 2 + 1
a = raw_input('')
a = int(a)
l = []
for cnt in range(a):
	b = raw_input('')
	b = int(b)
	c = b**0.5
	c = int(c)
	d = c**2
	if d == b:
		l.append(2*c-1)
	elif b<=d+c:
		l.append(2*c)
	else:
		l.append(2*c+1)
for cnt in l:
	print(cnt)