fun main() {
    val n = readLine()!!.toInt()
    val mutableList = readLine()!!.split(" ").map { it.toLong() }.toMutableList()
    var cnt = 0

    while (true){
        if (check(mutableList)){
            cnt++
            for (i in mutableList.indices){
                mutableList[i] = mutableList[i] / 2
            }
        } else {
            break
        }
    }
    println(cnt)

}

fun check(list: MutableList<Long>): Boolean{
    val n = list.size
    var cnt = 0

    for (i in list){
        if (i%2==0L){
            cnt++
            if (cnt == n){
                return true
            }
        } else {
            break
        }
    }
    return false
}