import java.util.*

val sc = Scanner(System.`in`)
val N = sc.nextInt()

fun main(args: Array<String>) {
    (1..N).map { calc(sc.nextInt()) }.min().let(::println)
}

fun calc(A: Int): Int {
    var i = 2
    var result = 0
    while (A % i == 0) {
        result++
        i *= 2
    }
    return result
}
