#include <iostream>
#include <cstring>
#include <string>
#include <cmath>
using namespace std ;
 
int main()
{
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
    #endif
int n;
bool op= false ;
bool stop = false ;
int operations = 0;
cin >> n ;
int a[n];
for (int i = 0; i < n; i++)
{cin >> a[i];}
 
while (stop == false)
{
    for (int k = 0; k < n; k++)
    {
        if (a[k] % 2 == 0)
        {
            op = true ;
            // operations += 1;
        	a[k] /= 2 ;
        }
        else if(a[k] %2 != 0)
        {   op=false;
            stop = true;
            break;
        }
        
 
    }
 
    if (op==true)
    {
        operations+=1;
    }
    
}
cout << operations;
 
 
}