function Main(input) {
  input = input.split("\n");
  const n = parseInt(input[0],10);
  var a_n = input[1].split(" ");;
  let ans = 0;
  let a_i = 0;
  let end = 0;
  while (end === 0) {
    let a = parseInt(a_n[a_i],10)
    if (a % 2 === 0) {
      a /= 2;
    } else {
      end = 1;
    }
    a_n[a_i] = a;
    a_i++;
    if(a_i === n){
      a_i = 0;
      ans++;
    }
  }
  console.log(ans);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));