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

int main() {
  int N,A,a,imin,j;
  cin >> N >> A;
  for (imin = 0; A % 2 == 0; imin++)
    A /= 2;
  for (int i = 0;i < N-1; i++) {
    cin >> a;
    for (j = 0;a % 2 == 0;j++)
      a /= 2;
    if (j < imin)
      imin = j;
  }
  cout << imin << endl;     
}
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
#define rep(i, n); for(ll i = 0; i < (ll)n; i++)
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }

int main() {
  ll n; cin >> n;
  vector<ll> v(n);
  rep(i, n)
    cin >> v.at(i);
  
  bool fin = false;
  ll ans = 0;
  
  rep(i, 30){
    
    rep(j, n){
      if(v.at(j)%2 == 1){
        fin = true;
        break;
      }
      else
        v.at(j) /= 2;
    }
    
    if(fin)
      break;
      
    ans++;
  }
  cout << ans << endl;
}
