fun main(args: Array<String>){
    val num = readLine()!!.toInt()
    val input = readLine()!!.split(" ").map(String::toInt)
    var result = 0

    populate(result, input)
}

fun populate(result: Int, input: List<Int>){
    val next = mutableListOf<Int>()
    input.forEach {
        if (it % 2 != 0){
            print(result)
            return
        }
        next.add(it/2)
    }
    populate(result + 1, next)
}