object Main extends App {

    def division_counter(n: Int, count: Int = 0): Int =
        if(n % 2 == 0) division_counter(n / 2, count + 1) else count
    
    val sc = new java.util.Scanner(System.in)
    val n = sc.nextInt
    val list = List.fill(n)(sc.nextInt)
    print(list.map(x => division_counter(x)).min)
}
