ADV04J - Invisible point

no tags 

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

hide comments
rajesh: 2011-07-18 06:24:47

can any one explain how is the ans 3 for 4.


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/