program B_solution

implicit none
integer :: n,a(200),i
double precision :: b(200)

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

i = 1
do
b = mod(a, 2**i)
if( sum(b) > 0) exit
i = i + 1
end do

write(*,*) i-1

end program 