program ABC081B
    implicit none
    integer(8)::N,i,calc,ans=1000000000
    integer(8),allocatable::A(:)
    read*,N
    allocate(A(N))
    read*,A

    do i=1,N
        calc=0
        do
            if(mod(A(i),2)==1)exit
            A(i)=A(i)/2
            calc=calc+1
        end do
        ans=min(ans,calc)
    end do
    print'(i0)',ans
end program ABC081B