program main
    implicit none
    integer :: n,i,j,divide,cnt
    integer,allocatable,dimension(:) :: a

    read(5,*) n

    allocate (a(n))
    read(5,*) (a(i),i=1,n)

    do j = 1, 1000
        divide = 0
        
        do i = 1, n
            if ( mod(a(i),2)==0 ) then
                divide = divide +1
            endif
        end do

        if ( divide == n ) then
            cnt = cnt + 1
            do i = 1, n
                a(i) = a(i)/2
            end do
        else
            exit
        endif
    end do

    write(6,*) cnt

end program main