object Main extends App {

  val n = io.StdIn.readLine.toInt
  val a = io.StdIn.readLine.split(" ").map(_.toInt)

  val ans = {
    var va = a
    var cnt = 0;
    var b = true;
    while(b) {
      if(va.forall(e => (e & 1) == 0 && e != 0)){ cnt += 1; va = va.map(e => e >> 1) }
      else b = false
    }
    cnt
  }
  println(ans)
}