function myout(text){console.log(text);}//standard output
function Main(input) {
	//input = parseInt(input);
	//input = input.trim().split(" ");
	input = input.trim().split("\n");
	//input = input.trim().split(" ").map((a)=>Number(a));
	//input = input.trim().split("\n").map((a)=>Number(a));
  var N = parseInt(input[0]);
  var list = input[1].split(" ").map((a)=>Number(a));
  var output = 0;
  while(true){
  	for(var i = 0; i < N; i++){
   	 if(list[i] % 2 == 0){
        list[i] /= 2;
        }else{
         myout(output);
          return;
        }
	}
    output++;
  }
}

Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());
