// Learn more about F# at http://fsharp.org

open System

let Input f =
    stdin.ReadLine() |> f

let InputArray f =
    stdin.ReadLine().Split(' ') |> Array.map f

[<EntryPoint>]  
let main argv =

    let n = Input int
    let a = InputArray int

    let ableDivCount n =
        let mutable c = 0
        let mutable d = 2
        while n % d = 0 do
            d <- d * 2
            c <- c + 1
        c

    a
    |> Seq.map ableDivCount
    |> Seq.min
    |> printfn "%d"

    0 // return an integer exit code
