fun main(args:Array<String>){
  val n=readLine()!!.toInt();
  val a=readLine()!!.split(" ").map(String::toInt);
  println(f(a,0));
}

fun f(a:List<Int>,count:Int):Int{
  return if(a.all{it%2==0}){
    f(a.map{it/2},count+1);
  }else{
    count;
  }
}