program B081
    implicit none
    integer(8) :: N
    integer(8), allocatable, dimension(:) :: A
    integer(8) :: i, j, sum

    read(5,*) N
    allocate(A(N))
    read(5,*) (A(i), i = 1, N)
    sum = 0

    j = 0
    do while (j == 0)
        do i = 1, N
            if (mod(A(i),2) == 0) then
                A(i) = A(i) / 2
            else
                j = j + 1
            end if


        end do
        if (j == 0) then
            sum = sum + 1
        end if



    end do


    write(6,*) sum




end program B081