(*
ocamlfind ocamlopt -package batteries -linkpkg main.ml -o a.out
*)
open Batteries

let n = Scanf.sscanf (read_line ()) "%d" (
        fun n -> 
                n
)

let lst = Str.split (Str.regexp " ") (read_line ())
          |> List.map int_of_string

let rec f lst =
        let exists = List.exists (fun elmnt -> elmnt mod 2 = 1) lst in
                if exists then
                        0
                else
                        1 + (f (List.map (fun elmnt -> elmnt lsr 1) lst))

let () =
        f lst
        |> Printf.printf "%d\n"

