module global_variables
  integer,parameter::max_n = 200
  integer,parameter::inf = 1000000000
  integer n
  integer::a(max_n)
end module global_variables
program main
  use global_variables
  implicit none
  integer i,res,tmp
  read *, n
  read *, (a(i),i=1,n)
  res = inf
  do i=1,n
    tmp = 0
    do while (a(i) > 0 .and. ibits(a(i),0,1)==0)
      tmp = tmp + 1
      a(i) = a(i) / 2
    enddo
    res = min(res,tmp)
  enddo
  print '(i0)', res
end program main
