program main
    implicit none
    integer N, counter, bool, i, j
    integer, dimension(210) :: A = 0
    counter = 0
    bool = 0
    read *, N
    read *, A(1:N)

    do j = 1,40
        bool = 0
        do i = 1,N
            if(mod(A(i), 2) /= 0)bool = 1
        end do

        if(bool == 0) then
            counter = counter + 1
            do i = 1,N
                A(i) = A(i) / 2
            end do
        else
            exit
        end if
    end do
    
    print *, counter

end program main
