function Main(input) {
  input = input.split("\n");
  tmp = input[1].split(" ");

  var N = parseInt(input[0], 10);
  var A = tmp.map(x => parseInt(x, 10))

  // var b = parseInt(tmp[0], 10);
  // var c = parseInt(tmp[1], 10);
  // var s = input[2];

  // Convert String to Integer
  // var a = ~~input[0];
  // var b = ~~input[1];


  var Sunuke = function(N, A){
    this.A = A;
    this.N = N;
  };

  Sunuke.prototype = {
    splitNumber : function(){
      var count = 0;
      var flag = true;
      var arr = this.A;
      while(flag){
        for(var item of arr){
          if(item%2 != 0 || item == 0){
            flag = false;
            break;
          }
        }
        if(flag == false) return count;
        arr = arr.map(x => x/2);
        count++;
      }
    }
  }
  var sunuke = new Sunuke(N, A);
  console.log(sunuke.splitNumber());

  // console.log('%d %d',N,Q);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
