#include <bits/stdc++.h>
using namespace std;

int main() {
  int ans = 500000,i,N,A;cin >> N;
  for(i = 0; i < N; i++){
    cin >> A;
    int count = 0;
    while(A%2 == 0){
      A /= 2;count++;
    }
    if(ans > count) ans = count;
  }
  cout << ans;
}