let rec count_factor_2 x =
  if x mod 2 = 0 then 1 + count_factor_2 (x/2)
  else 0

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