[<AutoOpen>]
module DivRem =
    type DivRem = DivRem with
        static member (/%) (x : int32,  DivRem) = fun y -> System.Math.DivRem(x, y)
        static member (/%) (x : int64,  DivRem) = fun y -> System.Math.DivRem(x, y)

    let inline (/%) x y = (x /% DivRem) y

let n = stdin.ReadLine() |> int
let array = stdin.ReadLine().Split(' ') |> Array.map int
let rec divCnt ar cnt =
    let divRems = ar |> Array.map (fun a -> a /% 2)
    if divRems |> Array.exists (fun t -> t |> snd = 1) then
        cnt
    else
        divCnt (divRems |> Array.map (fun t -> t |> fst)) (cnt + 1)
divCnt array 0 |> printfn "%d"
