object Main{
  def main(args: Array[String]){
    val sc = new java.util.Scanner(System.in)
    val num = sc.nextInt
    val board = List.fill(num)(sc.nextInt)
    val count = 0
    operate(board, count)
  }
  def operate(board: List[Int], count: Int):Unit = {
    if(board.forall(_ % 2 == 0)){
      operate(board.map(x => x / 2), count + 1)
    } else {
      println(count)
    }
  }
}