implicit none
integer,allocatable:: a(:)
integer:: n,i,j,count,b

read(*,*) n
allocate(a(n))
read(*,*) a

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

if(b==n)then
a=a/2
count=count+1
else
exit
endif

end do

write(*,*) count

end
