#include <stdio.h>
int a, b, c;
int main() {
	while(true) {
		scanf("%d", &a);
		if(a == 0) break;
		for(int i = 0; i < a; i++) scanf("%d", &b);
		c = 0;
		while (a != 0) {
			a /= 2; c++;
		}
		printf("%d\n", c);
	}
	return 0;
}