program blackboard
	implicit none
    integer :: N,devided,i,j
    integer,allocatable :: A(:)
    
    j=0
    devided=0
    read(*,*) N
    allocate(A(N))
    read(*,*) A
    do
    	do i =1,N
        	!write(*,*) mod(A(i),2)
            if(mod(A(i),2)==1) then           	
        		j=1 ! Owarimasu
                exit
            else
            	A(i)=A(i)/2
            endif
        end do
        
        if(j==1) then
        	exit
        endif
        devided=devided+1
    end do
    write(*,'(i0)') devided
    deallocate(A)
    
    
end program blackboard