function Main(input){
  var list = input.split("\n")[1].split(" ");
  var max = 0;
  for(var i of list){
    var cnt = 0;
    while(true){
      if(i%2==0){
        i/=2;
        cnt++;
      }else{
        break;
      }
    }
    max = Math.max(max, cnt);
  }
  console.log(max);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));