import scala.util.control.Breaks

object Main{
  def main(args: Array[String]) {
    val sc = new java.util.Scanner(System.in)
    val n = sc.nextInt
    var list = Seq.fill(n)(sc.nextInt)

    var count = 0
    val b = new Breaks
    b.breakable { while (true) {
      if (list.forall(_ % 2 == 0)) {
        list = list.map(_ / 2)
        count += 1
      } else
        b.break
    } }
    println(count)
  }
}
