#include <iostream>

long int t, n, m = 0;

int main(){
	freopen("Weighing.in", "r", stdin);
	scanf("%d", &t);
	for(int i = 0;i < t;i++){
		m = 0;
		scanf("%d", &n);
		while(n/2 && n>=2){
			n = n / 2;
			m = m + 1;
		}
		printf("%d\n", m);
	}
}
