let rec divList (i : int) (arr : int []) =
  Array.map (fun x -> if x%2=0 then true else false) arr
  |> Array.reduce (&&)
  |> function
      | true -> divList (i+1) (Array.map (fun x -> x/2) arr)
      | false -> i

let N = stdin.ReadLine()

stdin.ReadLine().Split(' ')
|> Array.map int
|> divList 0
|> printfn "%d"