#include <vector>
#include <iostream>

using namespace std;

int main() {
    int n;
    cin >> n;
    int m = 1e9;
    for (int i = 0; i < n; i++) {
        int a;
        cin >> a;
        m = min(__builtin_ctz(a), m);
    }
    cout << m << endl;
}
#include <bits/stdc++.h>
using namespace std;
int main(void){
    int N, A;
    cin >> N;
    int times = 0;
    int answer = 30;
    
    for (int i=0; i < N; i++) {
        cin >> A;
        
        while (A % 2 == 0) {
            times +=1;
            A /=2;
        }
        
        if (times <= answer) answer = times;
        
        times = 0;
    }
    
    cout << answer << endl;
}