import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val n = sc.nextInt()
    val a = IntArray(n) { sc.nextInt() }

    var aa = a.reduce { acc, i ->
        acc or i
    } ?: 0


    var ret = 0
    var i = 0
    while ((aa and (1 shl i)) != 1 && aa > 0) {
        aa /= 2
        ret++
    }

    println(ret)

}