import scala.annotation.tailrec

object B {

    def allEven(list: List[Int]): Boolean = list.forall(_ % 2 == 0)

    @tailrec
    def update(list: List[Int], count: Int = 0): Int =
        if (allEven(list)) update(list.map(_ / 2), count + 1) else count

    def main(args: Array[String]): Unit = {
        val sc = new java.util.Scanner(System.in)
        val n = sc.nextInt
        val in2 = List.fill(n)(sc.nextInt)
        print(update(in2))
    }
}
