function Main(input) {
  input = input.split("\n");
  var arr = input[1].split(" ").map(Number);
  var ans = new Array(input[0]);
  for(var i=0;i<input[0];i++){
      var max = 0;
    for(var j=1;true;j++){
    arr[i] = arr[i]/2;
    if(max<j) max = j;
    if(arr[i]%2==1){break;}
    }
    ans[i] = max;
  }
  console.log(Math.min.apply(null,ans));
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
