object Main extends App {
  val N = readLine.toInt
  val arr = readLine.split(" ").map(_.toInt).toList
  
  def devide(arr: Seq[Int], count: Int): Int = {
    val devided = arr.map(_ / 2)
    if (arr.exists(_ % 2 == 1)) count
    else devide(devided, count + 1)
  }
  
  println(devide(arr, 0))
}