import scala.annotation.tailrec
object Main extends App {

  @tailrec
  def rec(e:Int ,cnt:Int): Int = {
    if((e & 1) == 1) cnt
    else rec(e>>1, cnt+1)
  }

  val n = io.StdIn.readLine.toInt
  val a = io.StdIn.readLine.split(" ").map(e => rec(e.toInt, 0))

  println(a.min)
}