object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val n = sc.nextInt()
  val a = List.fill(n)(sc.nextInt())

  def shiftCount(n: Int, res: Int = 0) : Int = {
    if (n % 2 == 0) {
      shiftCount(n / 2, res + 1)
    } else {
      res
    }
  }

  println(a.map(shiftCount(_)).min)
}
