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
Case 1 : 1 + 2 + 1
Case 2 : 1
Case 3 : 1 + 2 + 3 + 2 + 1