local n = io.read("*n")
local a = {{}}
for i = 1, n do
    local raw = io.read("*n")
    if raw % 2 == 1 then
        print(0); os.exit()
    else
        a[1][i] = raw / 2
    end
end

local count = 1
while true do
    a[count + 1] = {}
    for i = 1, n do
        if a[count][i] % 2 == 1 then
            print(count); os.exit()
        else
            a[count + 1][i] = a[count][i] / 2
        end
    end
    a[count] = nil
    count = count + 1
end