
let a = Int(readLine()!)!
var b = readLine()!.split(separator: " ")
    .map({Int($0)!})
var count = 0

while true {
    var c = b.map({$0/2}).filter({$0.isMultiple(of: 2)}).count
    if c != a {
    if count != 0 {
    count += 1
    }
        break
    }
    b = b.map({$0/2})
    count += 1
    
}

print(count)