import java.util.Scanner

object Main {
  def main(args: Array[String]): Unit = {
    //nextLineとnextを同時に使ったら死ぬ
    val sc = new Scanner(System.in)
    val n = sc.nextInt()
    val a = List.fill(n)(sc.nextInt())
    println(a.map(m => f(m)).min)

    def f(n: Int): Int = {
      n % 2 match {
        case 0 => 1 + f(n / 2)
        case 1 => 0
      }
    }
  }
}
