object Main extends App {
  def reverse(nums: List[Int]): Int = {
    def accumlator(acc: Int, nums: List[Int]): Int = {
      nums.forall(_ % 2 == 0) match {
        case true => accumlator(acc + 1, nums.map(_ / 2))
        case false => acc
      }
    }
    accumlator(0, nums)
  }
  val sc = new java.util.Scanner(System.in)
  val _ = sc.nextLine()
  val nums = sc.nextLine().split(" ").map(_.toInt).toList
  val ret = reverse(nums)
  println(ret)
}
