const main = () => {
  const as = getParams();
  console.log(solve(as));
};

const getParams = () =>
  getStdin().split(/\s/).slice(1).map(Number);

const getStdin = () =>
  require('fs').readFileSync('/dev/stdin', 'utf8').trim();

const solve = as =>
  Math.min(...as.map(numTwos));

const numTwos = n => {
  if (odd(n))
    return 0;
  return 1 + numTwos(n/2);
};

const odd = n =>
  n % 2 === 1;

main();
