function Main(input){
  inp = input.split('\n');
  N = parseInt(inp[0]);
  A = inp[1].split(' ').map((i) => { return parseInt(i); });
//  N = 3;
//  A = [3, 2, 1];

  result = true;
  count = 0;
  do {
    
    // is All Even Number
    for (i = 0; i < N; i++) {
      if (A[i]%2 != 0) {
        result = false;
        break;
      }
      A[i] = A[i]/2;
    }
    
    if (result) count++;
  } while (result);

  console.log(count);
}

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