object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val n = sc.nextInt()
  val l = Vector.fill(n)(sc.nextInt())

  def go(num: Int, xs: Vector[Int]): Int = {
    if (xs.exists(_ % 2 == 1)) num
    else go(num + 1, xs.map(_ / 2))
  }

  println(go(0, l))
}
