object Main extends App {

  val n = io.StdIn.readLine().toInt
  val nums = io.StdIn.readLine().split(' ').map(_.toInt)
  calc(nums)

  def calc(nums: Array[Int], cnt: Int = 0): Array[Int] = {
    val t = for (x <- nums) yield {
      if (x % 2 != 0) {
        println(cnt)
        sys.exit
      }
      x / 2
    }
    if (cnt == 10) {
      sys.exit()
    }
    calc(t, cnt + 1)
  }

}