let rec div2 = function 0 -> 0 | n -> if n mod 2 <> 0 then 0 else 1 + div2 (n / 2)

let () = Scanf.scanf "%d\n" @@ fun n ->
  Array.init n (fun _ -> Scanf.scanf "%d " div2)
  |> Array.fold_left min max_int
  |> Printf.printf "%d\n"