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

let rec logtwo count x =
    match x&&&1 with
    | 1 -> count
    | 0 -> logtwo (count+1) (x>>>1)

A
|> Array.map (logtwo 0)
|> Array.min
|> stdout.WriteLine