#include <iostream>
#include <vector>
using namespace std;

int main() {
    uint N; cin >> N;
    vector<int> A(N, 0);
    for (auto &a: A) cin >> a;

    int cnt = 0;
    bool exist = false;
    while (!exist) {
        for (size_t i=0; i<A.size(); ++i) {
            if (A[i] % 2 != 0) {
                exist = true;
                break;
            }
            A[i] /= 2;
        }
        if (!exist) ++cnt;
    }
    cout << cnt << endl;
}

/*
ID: anonymo14
TASK: wormhole
LANG: C++                 
*/
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pair<int,int>> vpii;

#define F first
#define S second
#define PU push
#define PUF push_front
#define PUB push_back
#define PO pop
#define POF pop_front
#define POB pop_back

#define REP(i,a,b) for(int i=a; i<=b; i++)

#define MOD 1000000007

int me(int val) {
	for(int i=1;;i<<=1) {
		if(i&val)return log2(i);
	}
	return log2(val);
}
	
void solve(int test_case) {//227
	int n;
	cin>>n;
	int mi = 64;
	REP(i,1,n) {
		int val;
		cin>>val;
		mi=min(mi,me(val));
	}
	cout<<mi;
}

int main() {
	
	////// FILE BASED IO////
	//freopen("wormhole.in", "r", stdin);
	//freopen("wormhole.out", "w", stdout);
	///////////////
	
	ios::sync_with_stdio(0);
	cin.tie(0);
	int t=1;
	//cin>>t;
	REP(i,1,t) {
		solve(i);
	}
	return 0;
}	
