// B: Shift only
"use strict";

const DEBUG_MODE = false;
const rawInput = DEBUG_MODE
  ? "6\n382253568 723152896 37802240 379425024 404894720 471526144"
  : require("fs")
      .readFileSync("/dev/stdin", "utf8")
      .trim();

const allEven = intList => intList.every(item => item % 2 === 0);

const process = inputRaw => {
  const inputs = inputRaw.split("\n");
  const count = parseInt(inputs[1]);
  let blackboardNumbers = inputs[1].split(" ").map(item => parseInt(item));

  let operationCount = 0;

  // TODO: can probably use bitwise here to determine how many operations
  // in each number before becoming odd in one runthrough of array
  //
  // do this when there is time to optimise after answering everything
  // or use python->numpy to easily divide vector

  while (allEven(blackboardNumbers)) {
    blackboardNumbers = blackboardNumbers.map(item => Math.floor(item / 2));
    operationCount++;
  }

  console.log(operationCount);
};

process(rawInput);
