fun main(args: Array<String>) {
    val cnt = readLine()!!.toInt()
    var nums = readLine()!!.split(" ").subList(0, cnt - 1).map { it.toInt() }
    var ope = 0
    while (0 == nums.count { it.and(1) == 1 }) {
        ope++
        nums = nums.map { it.shr(1) }
    }
    print(ope)
}
