(* O(n * log(max a_s)) *)
let _ = Scanf.scanf "%d" @@ fun n ->
  let a_s = Array.init n @@ fun _ -> Scanf.scanf " %d" @@ (+) 0 in
  let rec count m =
    for i = 0 to n - 1 do
      if a_s.(i) mod 2 = 1 then (Printf.printf "%d\n" m; exit 0);
      a_s.(i) <- a_s.(i) / 2
    done;
    count (m + 1) in
  count 0 |> Printf.printf "%d\n"