N=io.read("n")
A={}
for i=1,N do
  A[i]=io.read("n")
end
local count=0
local t=A[#A]
local sign=0
while true do
  for i=1,N do
    if A[i]%2==1 then
      sign=1
      break
    end
    A[i]=A[i]//2
  end
  if A[#A]==t//2 then
    count=count+1
    t=A[#A]
  end
  if sign==1 then
    break
  end
end
print(count)
  