object Main extends App {

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

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

    val sc = new java.util.Scanner(System.in)
    val n = sc.nextInt
    val in2 = List.fill(n)(sc.nextInt)
    print(update(in2))
}
