object Main extends App{
  import scala.io.StdIn.readLine
  
  val _ = readLine
  val a = readLine.split(" ").map(_.toLong) 
  
  def shift(x:Long):Long ={
  	def shiftRe(acc:Long,x:Long):Long =
    {
    if(x % 2 == 0) shiftRe(acc + 1,x / 2);
      else acc
    }
    shiftRe(0,x)
  }
  
  println(a.map(shift(_)).min.toString)
}
