    fun main(args: Array<String>) {
        val input = read()
        println(countShift(input, 0))
    }

    fun read(): List<Int> {
        readLine() // Nを読み捨てる
        val input = readLine()
        return input!!.split(' ').map { Integer.parseInt(it) }
    }

    tailrec fun countShift(list: List<Int>, count: Int): Int {
        if (list.all { it % 2 == 0 })
            return countShift(list.map { it / 2 }, count + 1)
        else
            return count
    }