program atcoder
    implicit none
    integer :: N, i00, i01, counter, devide
    integer, allocatable :: a(:)

    read *, N
    allocate(a(N))
    read *, (a(i00), i00 = 1, N )
    counter = 0

    do i00 = 1, 1000
        devide = 0
        do i01 = 1, N
            if(mod(a(i01), 2) == 0) then
                devide = devide + 1
            end if
        end do
        if(devide == N) then
            counter = counter + 1
            do i01 = 1, N
                a(i01) = a(i01)/2
            end do
        else
            exit
        end if
    end do

    print '(i0)', counter
    deallocate(a)


end program atcoder
