fun main(args: Array<String>) {
    val n = readLine()!!
    val list = readLine()!!.split(" ").map(String::toInt).toMutableList()
    var num = 0
    var breakFrag = false
    while(true) {
        num += 1
        for((index, value) in list.withIndex()) {
            if(value % 2 == 0) {
                list[index] = value / 2
            } else if(value % 2 != 0) {
                breakFrag = true
                num -= 1
                break
            }
        }
        if(breakFrag) {
            break
        }
    }
    print(num)
}