fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    val xs: List<Int> = readLine()!!.split(" ").map(String::toInt)
    println(xs.map { count(it) }.min())
}

fun count(x: Int): Int {
    return if (x % 2 != 0) 0 else 1 + count(x / 2)
}