local ior = io.read
local n = ior("*n")

local function get2(x)
  local z = 0
  while(x % 2 == 0) do
    x = x // 2
    z = z + 1
  end
  return z
end

local ret = get2(ior("*n"))

for i = 2, n do
  ret = math.min(ret, get2(ior("*n")))
end
print(ret)
