import java.util
import java.util.Scanner

object Main {
  def main(args: Array[String]): Unit = {
    val sc = new Scanner(System.in)
    val n = sc.nextInt()
    val cnt = (x: Int) => {
      var ret = 0
      var y = x
      while(y%2==0) {
        y /= 2
        ret += 1
      }
      ret
    }
    var l = List[Int]()
    for(i <- 0 until n) {
      l = sc.nextInt() :: l
    }
    println(l.map(cnt).min)
  }
}
