Module Main

    Sub Main()

        Dim n As Integer = 0
        Dim a() As String
        Dim resCnt As Integer = 1 << 29

        '入力値取得
        n = Integer.Parse(Console.ReadLine())
        a = Split(Console.ReadLine())

        '配列に格納
        Dim arrVal(n - 1) As Integer
        For i As Integer = 0 To n - 1
            arrVal(i) = Integer.Parse(a(i))
        Next

        For i As Integer = 0 To n - 1
            Dim cnt As Integer = 0
            Dim num As Integer = 0

            num = Integer.Parse(a(i))
            While (num Mod 2) < 1
                cnt += 1
                num \= 2
            End While

            If cnt < resCnt Then
                resCnt = cnt
            End If
        Next

        '処理結果出力
        Console.WriteLine(resCnt.ToString)

    End Sub

End Module