use std::io::{stderr, stdin, stdout, BufReader, BufWriter, Cursor, Read, Write};
use std::iter::Iterator;
use std::str::FromStr;
// use std::slice::Iter;

macro_rules! _ft { () => (impl FnOnce(&mut Cursor<Vec<u8>>, &mut Vec<u8>, &mut Vec<u8>)); }

#[allow(dead_code)]
fn main() {
  let stdin = stdin();
  let r = &mut BufReader::new(stdin.lock());
  let stdout = stdout();
  let w = &mut BufWriter::new(stdout.lock());
  let stderr = stderr();
  let err = &mut BufWriter::new(stderr.lock());
  run(r, w, err);
  w.flush().unwrap();
  err.flush().unwrap();
}

#[allow(dead_code)]
fn test(input: &str, output: &str, f: _ft!()) {
  let r = &mut Cursor::new(input.as_bytes().to_vec());
  let w: &mut Vec<u8> = &mut Vec::new();
  let err: &mut Vec<u8> = &mut Vec::new();
  f(r, w, err);
  writeln!(stderr(), "{}", String::from_utf8(err.to_vec()).unwrap()).unwrap();
  assert_eq!(String::from_utf8(w.to_vec()).unwrap(), output)
}

macro_rules! t {
  ($f: ident => $input: expr, $output: expr) => (
    #[test]
    fn $f() { test($input, $output, run); }
  );
}

#[allow(unused_macros)]
macro_rules! args {
  ($($arg: expr),*) => ({
    let mut s = String::new();
    $(s += &format!("{} ", $arg);)*
    s.pop().unwrap();
    s
  });
}

#[allow(dead_code)]
fn read<F: FromStr, R: Read>(reader: &mut R) -> F {
  let str = reader
    .by_ref()
    .bytes()
    .map(|c| c.unwrap() as char)
    .skip_while(|c| c.is_whitespace())
    .take_while(|c| !c.is_whitespace())
    .collect::<String>();
  str.parse::<F>().ok().unwrap()
}

#[allow(unused_macros)]
macro_rules! r {
  ($stream: expr) => (read::<String, _>($stream));
  ($stream: expr, ) => (r!($stream));
  ($stream: expr; ) => (r!($stream));
  ($stream: expr; $t: ty) => (read::<$t,  _>($stream));
  ($stream: expr; $($t: ty),*) => (($(r!($stream; $t)),*));
  ($stream: expr; $t: ty; $n: expr) => ((0..$n).map(|_| r!($stream; $t)).collect::<Vec<_>>());
}

macro_rules! _writes {
  ($stream: expr; $($arg: expr),*) => ({
    let mut f = false;
    $(
      if f { write!($stream, " ").ok(); } else { f = true; }
      write!($stream, "{}", $arg).ok();

    )*
  });
}

#[allow(unused_macros)]
macro_rules! w {
  ($stream: expr) => (write!($stream, " ").ok());
  ($stream: expr; ) => (w!($stream));
  ($stream: expr, ) => (w!($stream));
  ($stream: expr; $arg: expr) => (write!($stream, "{}", $arg).ok());
  ($stream: expr; $($arg: expr),*) => (_writes!($stream; $($arg),*));
  ($stream: expr, $($arg: tt)*) => (write!($stream, $($arg)*).ok());
}

#[allow(unused_macros)]
macro_rules! wl {
  ($stream: expr) => (writeln!($stream));
  ($stream: expr, ) => (wl!($stream));
  ($stream: expr; ) => (wl!($stream));
  ($stream: expr; $arg: expr) => (writeln!($stream, "{}", $arg));
  ($stream: expr; $($arg: expr),*) => (_writes!($stream; $($arg),*); wl!($stream));
  ($stream: expr, $($arg: tt)*) => (writeln!($stream, $($arg)*));
}

trait VecSelect<T> {
  fn select<U>(&self, f: impl FnMut(&T) -> U)  -> Vec<U>;
}

impl<T> VecSelect<T> for Vec<T> {
  fn select<U>(&self, mut f: impl FnMut(&T) -> U)  -> Vec<U> {
    self.iter().map(|i| f(i)).collect::<Vec<_>>()
  }
}

#[allow(unused_variables)]
fn run<R: Read, W: Write, E: Write>(r: &mut R, w: &mut W, err: &mut E) {
  let n = r!(r; i64);
  let a = r!(r; i64; n);
  let ans = a.iter().map(|i| i.trailing_zeros()).min().unwrap();
  w!(w; ans);
}

t!(tb1 => r"3
8 12 40", r"2");
t!(tb2 => r"4
5 6 8 10", r"0");
t!(tb3 => r"6
382253568 723152896 37802240 379425024 404894720 471526144", r"8");


Measured memory_bytes: 2208