Imports System

Public Class Program
    Public Shared Sub Main(args As String())

        Dim N As Integer = Integer.Parse(Console.ReadLine)
        Dim InputInteger() As Integer = Array.ConvertAll(Console.ReadLine.Split(" "), AddressOf Integer.Parse)

        Dim flag As Boolean = True
        Dim cnt As Integer = 0

        Do While DivideBy2(InputInteger)
            cnt += 1
        Loop

        Console.WriteLine(cnt)
    End Sub

    Private Shared Function DivideBy2(ByRef Input() As Integer) As Boolean

        For i As Integer = 0 To Input.Length - 1

            If Input(i) Mod 2 = 0 Then
                Input(i) = Input(i) / 2
            Else
                Return False
            End If

        Next

        Return True
    End Function
End Class
