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

#define all(cont) cont.begin(), cont.end()
#define rall(cont) cont.end(), cont.begin()
#define mp make_pair
#define pb push_back
#define fs first
#define sc second
#define fr(i, a, b) for(int i = a ; i < b ; i++)
#define fre(i, a, b) for(int i = a ; i <= b ; i++) //ini baru
#define frr(i, a, b) for(int i = a ; i >= b ; i--)
//#define fri(i, a, b) for (auto i = a; i != b; ++i)
#define tr(it, var) for(__typeof(var.begin()) it = var.begin(); it != var.end(); it++)
#define trr(rit, var) for(__typeof(var.rbegin()) rit = var.rbegin(); rit != var.rend(); rit++)
#define its(x) static_cast< ostringstream & >( ( ostringstream() << dec << x ) ).str() // int to string
#define fill1(a, c, x) fr(_I, 0, (c)) (a)[_I] = (x)
#define fill2(a, r, c, x) fr(_I, 0, (r)) fr(_J, 0, (c)) (a)[_I][_J] = (x)
#define boost ios_base::sync_with_stdio(false)
#define sz(x) ((int)(x).size())
#define deb(x) cout << #x" = " << x << '\n';
#define dist(x1, y1, x2, y2) sqrt((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1))
#define com(x, a, b) x/a + x/b - x/(a*b)
#define MEMSET(a, b) memset(a, (b), sizeof(a)) //ini baru

int binarySearch(int arr[], int l, int r, int x) // int result = binarySearch(arr, 0, n-1, x); // return index
{	//NOTE : DATA HARUS UNIK!!!
   if (r >= l)
   {
        int mid = l + (r - l)/2;
 
        // If the element is present at the middle 
        // itself
        if (arr[mid] == x)  
            return mid;
 
        // If element is smaller than mid, then 
        // it can only be present in left subarray
        if (arr[mid] > x) 
            return binarySearch(arr, l, mid-1, x);
 
        // Else the element can only be present
        // in right subarray
        return binarySearch(arr, mid+1, r, x);
   }
 
   // We reach here when element is not 
   // present in array
   return -1;
}


	/* GEOMETRY */
int square(int n) //pow(n,2) --- O(log n)
{
    // Base case
    if (n==0) return 0;
 
    // Handle negative number
    if (n < 0) n = -n;
 
    // Get floor(n/2) using right shift
    int x = n>>1;
 
    // If n is odd
    if (n&1)
        return ((square(x)<<2) + (x<<2) + 1);
    else // If n is even
        return (square(x)<<2);
}

int floorSqrt1(int x) // O(sqrt(n))
{
    // Base cases
    if (x == 0 || x == 1)
    return x;
 
    // Staring from 1, try all numbers until
    // i*i is greater than or equal to x.
    int i = 1, result = 1;
    while (result <= x)
    {
      i++;
      result = i * i;
    }
    return i - 1;
}

int floorSqrt(int x) // O(log n)
{    
    // Base cases
    if (x == 0 || x == 1) 
       return x;
 
    // Do Binary Search for floor(sqrt(x))
    int start = 1, end = x, ans;   
    while (start <= end) 
    {        
        int mid = (start + end) / 2;
 
        // If x is a perfect square
        if (mid*mid == x)
            return mid;
 
        // Since we need floor, we update answer when mid*mid is 
        // smaller than x, and move closer to sqrt(x)
        if (mid*mid < x) 
        {
            start = mid + 1;
            ans = mid;
        } 
        else // If mid*mid is greater than x
            end = mid - 1;        
    }
    return ans;
}
float power(float x, int y) // O(log n)
{
    float temp;
    if( y == 0)
       return 1;
    temp = power(x, y/2);       
    if (y%2 == 0)
        return temp*temp;
    else
    {
        if(y > 0)
            return x*temp*temp;
        else
            return (temp*temp)/x;
    }
}  

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

int kpk(int a, int b)
{
	int kpk = 0;
	fre(i, 1, b){
		kpk+=a;
		if(kpk%b == 0){
			break;
		}
	}
	return kpk;
}

int main() {
//    freopen("input2.in", "r", stdin);
	int n;
	scanf("%d", &n);
	int narr[123456];
	fr(i, 0, n){
		scanf("%d", &narr[i]);
	}
	bool done = false;
	int count = 0;
	while(!done){
		int i = 0;
		while(i < n && !done){
			if(narr[i] % 2 == 0){
				narr[i] = narr[i] / 2;
			} else {
				done = true;
			}
			i++;
		}
		if(!done){
			count++;
		}
	}

	cout << count << endl;
	return 0;
}





















Measured memory_bytes: 256