import  scala.io.StdIn._

object Main {
  def main(args: Array[String]): Unit = {
    val n: Int = readInt()
    val a: Array[Int] = readLine().split(" ").map(_.toInt)
    println(solve(n, a))
  }
  def time2(i: Int, ans: Int): Int = {
    i % 2 match {
      case 0 => time2(i / 2, ans + 1)
      case 1 => ans
    }
  }


  def solve(i: Int, ints: Array[Int]): Int =
    ints.foldLeft(10000000)((acc: Int, x: Int) => {val a = time2(x, 0)
      if(acc > a) a else acc
    }
    )
}
