let none x = x
let n = Scanf.bscanf Scanf.Scanning.stdin "%d\n" none

let a_list =
  let str_list =
    Scanf.bscanf Scanf.Scanning.stdin "%[^\n]" (String.split_on_char ' ') in
  List.map int_of_string str_list

let is_even n =
  if n mod 2 = 0
    then true
    else false


let count_half lst =
  let rec hojo lst count =
    if (List.fold_right (&&) (List.map is_even lst) true)
      then (hojo (List.map (fun n -> n/2) lst) count+1)
      else count
  in hojo lst 0

let () = print_int (count_half a_list)
