div2::Int->Int
div2 n = if mod n 2 == 0 then 1 + (div2 (div n 2)) else 0

solver::[Int]->Int
solver = minimum.(map div2)

main::IO()
main=do
  _<-getLine
  s<-getLine
  let d = map read (words s)
  print (solver d)