open System

let n = stdin.ReadLine() |> int
let a = stdin.ReadLine().Split(' ') |> Array.map int64

let rec isEven =
    fun i ->
        match i with
        | i when i % 2L = 0L -> 1L + isEven (i / 2L)
        | _ -> 0L

a
|> Array.map isEven
|> Array.min
|> stdout.WriteLine
