#include <iostream>
int main() {
  int n, a, m=1001001001, c;
  std::cin >> n;
  while(std::cin >> a) {
    c = 0;
    while((a&1)==0){++c;a=a>>1;}
    m = (c<m?c:m);
  }
  std::cout << m << "\n";
}
  