program main
    implicit none
    INTEGER :: i, n, ans = 1e9, ans1 = 0
    INTEGER, ALLOCATABLE :: a(:)
    read(*, *) n
    ALLOCATE(a(n))
    READ(*, *) (a(i), i = 1, n)
    do i = 1, n
        do while(mod(a(i), 2) == 0)
            ans1 = ans1 + 1
            a(i) = a(i) / 2
        enddo
        ans = min(ans, ans1)
        ans1 = 0
    enddo
    write(*, *) ans
end program main