
open Scanf
open Printf

let read_int () = scanf " %d" (fun x -> x)
let rec read_ints n = if n = 0 then [] else let i = read_int () in i :: read_ints (n-1)

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

let () =
  let n = read_int () in
  read_ints n |> List.map calc |> List.fold_left min 100 |> printf "%d\n"
