import java.util.Scanner

object Main extends App {
  val sc = new Scanner(System.in)

  val n = sc.nextInt

  val al = List.fill(n)(sc.nextInt)

  val res = al.map(v2(_)).min

  println(res)


  def v2(n: Int, cnt: Int = 0) :Int ={
    if(n % 2 != 0 ) cnt
    else v2(n / 2, cnt + 1)
  }
}