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{a =>
    def loop(n: Int, cnt: Int): Int ={
      if(n % 2 == 0 ) loop(n / 2, cnt + 1)
      else cnt
    }
    loop(a, 0)
  }.min

  println(res)
}