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

int main(){
  int N;
  cin>>N;
  vector<int> vec(N);
  for(int i=0;i<N;i++){
    cin>>vec.at(i);
  }
  vector<int> arr(N);
  for(int i=0;i<N;i++){
    int num=0;
    while(vec.at(i)%2==0){
      vec.at(i) = vec.at(i)/2;
      num+=1;
    }
    arr.at(i)=num;
  }
  int ans=arr.at(0);
  for(int i=1;i<N;i++){
    ans = min(ans, arr.at(i));
  }
  cout<<ans<<endl;
}
#include <algorithm>
#include <iostream>
#include <string>
using namespace std;

int main()
{
	int N;
	cin >> N;
	int num[N];
	int i = 0, count = 0;
	while (i < N)
		cin >> num[i++];
	int flag=0;
	while (true)
	{
		i = 0;
		while (i < N)
		{
			if (num[i] % 2 != 0)
				flag = 1;
			num[i] /= 2;
			i++;
		}
		if (flag == 1)
			break;
		count++;
	}
	cout << count << endl;
}