#!usr/bin/env python3

from collections import defaultdict

from collections import deque

from heapq import heappush, heappop

import sys

import math

import bisect

import random

def LI(): return list(map(int, sys.stdin.readline().split()))

def I(): return int(sys.stdin.readline())

def LS():return list(map(list, sys.stdin.readline().split()))

def S(): return list(sys.stdin.readline())[:-1]

def IR(n):

    l = [None for i in range(n)]

    for i in range(n):l[i] = I()

    return l

def LIR(n):

    l = [None for i in range(n)]

    for i in range(n):l[i] = LI()

    return l

def SR(n):

    l = [None for i in range(n)]

    for i in range(n):l[i] = S()

    return l

def LSR(n):

    l = [None for i in range(n)]

    for i in range(n):l[i] = LS()

    return l

sys.setrecursionlimit(1000000)

mod = 1000000007



#A

def A():

    n,a,b = LI()

    print((min(n*a,b)))

    return



#B

def B():

    s = S()

    print((s.count("1")))

    return



#C

def C():

    n = list(map(int, S()))

    k = 0

    s = sum(n)

    for i in range(len(n)):

        k *= 10

        k += n[i]

    if k%s == 0:

        print("Yes")

    else:

        print("No")

    return



#D

def D():

    n = I()

    a = LI()

    ans = float("inf")

    for i in range(n):

        m = 0

        while a[i]%2 == 0:

            m += 1

            a[i] //= 2

        ans = min(m,ans)

    print(ans)

    return



#E

def E():

    return



#F

def F():

    return



#G

def G():

    return



#H

def H():

    return



#I

def I_():

    return



#J

def J():

    return



#Solve

if __name__ == "__main__":

    D()

#!usr/bin/env python3

from collections import defaultdict,deque

from heapq import heappush, heappop

from itertools import permutations

import sys

import math

import bisect

def LI(): return [int(x) for x in sys.stdin.readline().split()]

def I(): return int(sys.stdin.readline())

def LS():return [list(x) for x in sys.stdin.readline().split()]

def S():

    res = list(sys.stdin.readline())

    if res[-1] == "\n":

        return res[:-1]

    return res

def IR(n):

    return [I() for i in range(n)]

def LIR(n):

    return [LI() for i in range(n)]

def SR(n):

    return [S() for i in range(n)]

def LSR(n):

    return [LS() for i in range(n)]



sys.setrecursionlimit(1000000)

mod = 1000000007



def solve():

    n = I()

    a = LI()

    ans = float("inf")

    for i in a:

        k = 0

        while not i&1:

            i >>= 1

            k += 1

        if ans > k:

            ans = k

    print(ans)

    return



#Solve

if __name__ == "__main__":

    solve()

#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random


def LI():
    return list(map(int, sys.stdin.readline().split()))


def I():
    return int(sys.stdin.readline())


def LS():
    return list(map(list, sys.stdin.readline().split()))


def S():
    return list(sys.stdin.readline())[:-1]


def IR(n):
    l = [None for i in range(n)]
    for i in range(n):
        l[i] = I()
    return l


def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):
        l[i] = LI()
    return l


def SR(n):
    l = [None for i in range(n)]
    for i in range(n):
        l[i] = S()
    return l


def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):
        l[i] = LS()
    return l


sys.setrecursionlimit(1000000)
mod = 1000000007
# A
def A():
    n, a, b = LI()
    print((min(n * a, b)))
    return


# B
def B():
    s = S()
    print((s.count("1")))
    return


# C
def C():
    n = list(map(int, S()))
    k = 0
    s = sum(n)
    for i in range(len(n)):
        k *= 10
        k += n[i]
    if k % s == 0:
        print("Yes")
    else:
        print("No")
    return


# D
def D():
    n = I()
    a = LI()
    ans = float("inf")
    for i in range(n):
        m = 0
        while a[i] % 2 == 0:
            m += 1
            a[i] //= 2
        ans = min(m, ans)
    print(ans)
    return


# E
def E():
    return


# F
def F():
    return


# G
def G():
    return


# H
def H():
    return


# I
def I_():
    return


# J
def J():
    return


# Solve
if __name__ == "__main__":
    D()

#!usr/bin/env python3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect


def LI():
    return [int(x) for x in sys.stdin.readline().split()]


def I():
    return int(sys.stdin.readline())


def LS():
    return [list(x) for x in sys.stdin.readline().split()]


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]


def LIR(n):
    return [LI() for i in range(n)]


def SR(n):
    return [S() for i in range(n)]


def LSR(n):
    return [LS() for i in range(n)]


sys.setrecursionlimit(1000000)
mod = 1000000007


def solve():
    n = I()
    a = LI()
    ans = float("inf")
    for i in a:
        k = 0
        while not i & 1:
            i >>= 1
            k += 1
        if ans > k:
            ans = k
    print(ans)
    return


# Solve
if __name__ == "__main__":
    solve()

-from collections import defaultdict -from collections import deque +from collections import defaultdict, deque +from itertools import permutations -import random -    return list(map(int, sys.stdin.readline().split())) +    return [int(x) for x in sys.stdin.readline().split()] -    return list(map(list, sys.stdin.readline().split())) +    return [list(x) for x in sys.stdin.readline().split()] -    return list(sys.stdin.readline())[:-1] +    res = list(sys.stdin.readline()) +    if res[-1] == "\n": +        return res[:-1] +    return res -    l = [None for i in range(n)] -    for i in range(n): -        l[i] = I() -    return l +    return [I() for i in range(n)] -    l = [None for i in range(n)] -    for i in range(n): -        l[i] = LI() -    return l +    return [LI() for i in range(n)] -    l = [None for i in range(n)] -    for i in range(n): -        l[i] = S() -    return l +    return [S() for i in range(n)] -    l = [None for i in range(n)] -    for i in range(n): -        l[i] = LS() -    return l +    return [LS() for i in range(n)] -# A -def A(): -    n, a, b = LI() -    print((min(n * a, b))) -    return -# B -def B(): -    s = S() -    print((s.count("1"))) -    return - - -# C -def C(): -    n = list(map(int, S())) -    k = 0 -    s = sum(n) -    for i in range(len(n)): -        k *= 10 -        k += n[i] -    if k % s == 0: -        print("Yes") -    else: -        print("No") -    return - - -# D -def D(): +def solve(): -    for i in range(n): -        m = 0 -        while a[i] % 2 == 0: -            m += 1 -            a[i] //= 2 -        ans = min(m, ans) +    for i in a: +        k = 0 +        while not i & 1: +            i >>= 1 +            k += 1 +        if ans > k: +            ans = k -    return - - -# E -def E(): -    return - - -# F -def F(): -    return - - -# G -def G(): -    return - - -# H -def H(): -    return - - -# I -def I_(): -    return - - -# J -def J(): -    D() +    solve()