fun main(args: Array<String>) {
    val N = readLine()!!
    val ans = readLine()!!.split(" ").map(String::toInt).map {
        var tmp = it
        var res = 0
        while(tmp%2==0) {
            res++
            tmp /= 2
        }
        res
    }.min()
    println(ans)
}