func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

func isAllEven(_ ints: [Int]) -> Bool {
    let existsOdd = ints.contains { (i) -> Bool in
        i % 2 == 1
    }
    return !existsOdd
}

func modAll(_ ints: [Int]) -> [Int] {
    let result = ints.map { (i) -> Int in
        i / 2
    }
    return result
}

func main() {
    let _ = Int(readLine()!)!
    var tmpInts = readInts()
    var count = 0
    var canContinue = isAllEven(tmpInts)
    while canContinue {
        count += 1
        tmpInts = modAll(tmpInts)
        canContinue = isAllEven(tmpInts)
    }
    
    print("\(count)")
}

main()
