open Core

let n = Scanf.scanf "%d" Fn.id

let a = List.init n (fun _ -> Scanf.scanf " %d" Fn.id)

let rec count i = if i mod 2 = 0 then 1 + count (i / 2) else 0

let m = a |> List.map ~f:count |> List.fold ~f:Int.min ~init:Int.max_value

let () = Printf.printf "%d\n" m
