Module Module081B
    Sub Main(ByVal args() As String)
        Dim N As Integer
        Dim i As Integer
        Dim result As Integer : result = 0
        Dim Flag As Boolean : Flag = True

        N = Console.ReadLine()

        Dim arr() As String
        Dim arr_I() As Integer

        ReDim arr(N - 1)
        ReDim arr_I(N - 1)

        arr = Split(Console.ReadLine())

        For i = 0 To N - 1
            arr_I(i) = Integer.Parse(arr(i))
        Next

        While True
            For i = 0 To N - 1
                If arr_I(i) Mod 2 <> 0 Then
                    Flag = False
                    Exit For
                End If
                arr_I(i) = arr_I(i) / 2
            Next
            If Flag = False Then
                Exit While
            End If
            result = result + 1
        End While

        Console.Write(result)
    End Sub
End Module
