fun count(x: Int): Int {
    var cnt = 0
    var tmp = x
    while(tmp%2==0) {
        cnt++
        tmp /= 2
    }
    return cnt
//    val res = cnt
//    return res
}

fun main(args: Array<String>) {
    val N = readLine()!!
    val As = readLine()!!.split(" ").map(String::toInt)
    val counts = As.map { count(it) }

    println(counts.min())
}