ADV04J - Invisible point

Daniel marked a point on a plane with sympathetic ink and he has also drawn a regular n-gon with normal ink. Max can see the n-gon, but can't see the point. Max can draw a line and ask Daniel which side of the line the point is. What is the minimum number of questions Max have to ask to define if the point is inside the n-gon in the worst case?

Input

First line of the input contains number t - the amount of test cases. Each test consists of the single integer n - the amount of sides of the n-gon.

Constraints

1 <= t <= 100
3 <= n <= 1000000

Output

For each test case print a single number - the answer to the question in the statement.

Example

Input:
1
4

Output:
3

Added by:Spooky
Date:2010-11-14
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64
Resource:Advancement Autumn 2010, http://sevolymp.uuuq.com/

hide comments
2015-06-12 23:59:17 DHEERAJ KUMAR
easy :)
2014-10-14 15:52:27 Gaurav sharma
easy one........half century (50) complete..:)
2014-08-15 20:32:13 ayush khundia
nice math-geometry problem......
2014-06-08 17:02:34 ankg
nice math! woahh! :D
2014-02-08 20:12:32 kailash
easy one........
2014-01-10 20:48:03 ABHISHEK004
nice prob.. :)
2013-12-30 18:12:45 P_Quantum
nice prblm..:)
2013-08-17 10:10:43 STARK
Is it necessary for line to cross the n-gon ???
2013-07-24 14:20:47 suryadev
@ Ouditchya Sinha thanks!
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.