#include <stdio.h>
int main()
{
	int t, st, val, n, i;
	float time;
	freopen("weighing.in", "r", stdin);
	scanf("%d", &t);
	for (i = 0; i < t; i++)
	{
		scanf("%d", &n);
		st=2;
		val = 4;
		while(val<n)
		{
			st++;
			val *= 2;
		}
		printf("%d\n", st-1);
	}
}