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

int main()
{
    int N, cnt = 0;
    cin >> N;
    vector<long long> vec(N);

    for (int i = 0; i < N; i++) {
        cin >> vec[i];
        if (vec[i] % 2 != 0) {
            cout << cnt << endl;
            return 0;
        }
    }

    while (true) {
        for (int i = 0; i < N; i++) {
            if (vec[i] % 2 != 0) {
                cout << cnt << endl;
                return 0;
            } else {
                vec[i] /= 2;
            }
        }
        cnt++;
    }
}
#include<iostream>
#include<vector>
#include<algorithm>
#include<cmath>
using namespace std;
int kai(int a) {
	int n = 0;
	while (1) {
		if (a % 2 == 0) {
			a = a / 2;
			n++;
		}
		else break;
	}
	return n;
}
int main() {
	int N;
	cin >> N;
	vector<int> A(N);
	int count = 100000;
	for (int i = 0; i < N; i++) {
		cin >> A[i];
		count = min(kai(A[i]), count);
	}
	cout << count << endl;
	return 0;
}