open System

let N = stdin.ReadLine() |> int
let A = stdin.ReadLine().Split(' ') |> Array.map int

let rec f x = 
    if x % 2 = 1 then 
        0
    else
        1 + f (x / 2)

let ans = Array.map f A |> Array.min
printfn "%d" ans
