import scala.io.{StdIn => in}

object Main extends App {
  val n = in.readInt
  val ans = in.readLine.split(" ").map(ch => rec(0,ch.toInt)).min

  def rec(cnt:Int, num:Int):Int = {
    if(num % 2 == 1) cnt
    else rec(cnt + 1, num / 2)
  }

  println(ans)
}