// وَأَن لَّيْسَ لِلْإِنسَانِ إِلَّا مَا سَعَىٰ (39) وَأَنَّ سَعْيَهُ سَوْفَ يُرَىٰ (40)

/* 
    author: Mazen Mohamed
*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace std;
using namespace __gnu_pbds;
using ll = long long;
using ld = long double;

#define all(x)  x.begin(),x.end()
#define v(x) vector<x>
#define nl '\n'
#define sp ' '
#define fxd(x) fixed << setprecision(x)
template<class t> using ordered_set = tree<t, null_type, less<t>, rb_tree_tag, tree_order_statistics_node_update>;
template<class t> using ordered_multiset = tree<t, null_type, less_equal<t>, rb_tree_tag, tree_order_statistics_node_update>;

ll mod = 1e9 + 7;
ld pi = acos(-1);

ll dr[8] = {0, 0, 1, -1, 1, 1, -1, -1};
ll dc[8] = {1, -1, 0, 0, 1, -1, 1, -1};


void hankasha()
{
    int n; cin >> n;
    ll mn = 1e9;
    for (int i = 0; i < n; i++)
    {
        ll x; cin >> x;
        ll cnt = 0;
        while (x%2 == 0)
        {
            x /= 2; cnt++;
        }
        mn = min(mn,cnt);
    }
    cout << mn;
}


int main()
{
    ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif

    int t = 1;
    
    while (t--)
    {
        hankasha();
    }
}