import java.util.*;
class Main
{
	public static void main(String[] args)
	{
		Scanner sc=new Scanner(System.in);
		int number=sc.nextInt();
		long []numberBox=new long[number];
		int error=0;
		for(int i=0;i<number;i++)
		{
			numberBox[i]=sc.nextInt();
			if(numberBox[i]==0)
			{
				error=1;
			}	
		}
		if(error==0)
		{
			checkEven(numberBox,number);
		}	
		else
		{
			System.out.print("0");
		}	
		
	}
	static void checkEven(long[] box,int num)
	{
		int countTimes=0;
		while(true)
		{
			int count=0;
			for(int i=0;i<num;i++)
			{
				if(box[i]%2==0)
					count++;
			}
			if(count==num)
			{
				for(int j=0;j<num;j++)
				{
					box[j]/=2;
				}
				countTimes++;
			}
			else
			{
				System.out.print(countTimes);
				break;
			}
		}	
	}
} import java.util.*; util.* java class Main
{
	public static void main(String[] args)
	{
		Scanner sc=new Scanner(System.in);
		int number=sc.nextInt();
		long []numberBox=new long[number];
		int error=0;
		for(int i=0;i<number;i++)
		{
			numberBox[i]=sc.nextInt();
			if(numberBox[i]==0)
			{
				error=1;
			}	
		}
		if(error==0)
		{
			checkEven(numberBox,number);
		}	
		else
		{
			System.out.print("0");
		}	
		
	}
	static void checkEven(long[] box,int num)
	{
		int countTimes=0;
		while(true)
		{
			int count=0;
			for(int i=0;i<num;i++)
			{
				if(box[i]%2==0)
					count++;
			}
			if(count==num)
			{
				for(int j=0;j<num;j++)
				{
					box[j]/=2;
				}
				countTimes++;
			}
			else
			{
				System.out.print(countTimes);
				break;
			}
		}	
	}
} Main public static void main(String[] args)
	{
		Scanner sc=new Scanner(System.in);
		int number=sc.nextInt();
		long []numberBox=new long[number];
		int error=0;
		for(int i=0;i<number;i++)
		{
			numberBox[i]=sc.nextInt();
			if(numberBox[i]==0)
			{
				error=1;
			}	
		}
		if(error==0)
		{
			checkEven(numberBox,number);
		}	
		else
		{
			System.out.print("0");
		}	
		
	} main {
		Scanner sc=new Scanner(System.in);
		int number=sc.nextInt();
		long []numberBox=new long[number];
		int error=0;
		for(int i=0;i<number;i++)
		{
			numberBox[i]=sc.nextInt();
			if(numberBox[i]==0)
			{
				error=1;
			}	
		}
		if(error==0)
		{
			checkEven(numberBox,number);
		}	
		else
		{
			System.out.print("0");
		}	
		
	} Scanner sc=new Scanner(System.in); sc new Scanner(System.in) int number=sc.nextInt(); number sc.nextInt() sc.nextInt sc long []numberBox=new long[number]; numberBox new long[number] number int error=0; error 0 for(int i=0;i<number;i++)
		{
			numberBox[i]=sc.nextInt();
			if(numberBox[i]==0)
			{
				error=1;
			}	
		} int i=0; int i=0; i 0 i<number i number i++ i++ i {
			numberBox[i]=sc.nextInt();
			if(numberBox[i]==0)
			{
				error=1;
			}	
		} {
			numberBox[i]=sc.nextInt();
			if(numberBox[i]==0)
			{
				error=1;
			}	
		} numberBox[i]=sc.nextInt() numberBox[i] numberBox i sc.nextInt() sc.nextInt sc if(numberBox[i]==0)
			{
				error=1;
			} numberBox[i]==0 numberBox[i] numberBox i 0 {
				error=1;
			} error=1 error 1 if(error==0)
		{
			checkEven(numberBox,number);
		}	
		else
		{
			System.out.print("0");
		} error==0 error 0 {
			checkEven(numberBox,number);
		} checkEven(numberBox,number) checkEven numberBox number {
			System.out.print("0");
		} System.out.print("0") System.out.print System.out System System.out "0" String[] args args static void checkEven(long[] box,int num)
	{
		int countTimes=0;
		while(true)
		{
			int count=0;
			for(int i=0;i<num;i++)
			{
				if(box[i]%2==0)
					count++;
			}
			if(count==num)
			{
				for(int j=0;j<num;j++)
				{
					box[j]/=2;
				}
				countTimes++;
			}
			else
			{
				System.out.print(countTimes);
				break;
			}
		}	
	} checkEven {
		int countTimes=0;
		while(true)
		{
			int count=0;
			for(int i=0;i<num;i++)
			{
				if(box[i]%2==0)
					count++;
			}
			if(count==num)
			{
				for(int j=0;j<num;j++)
				{
					box[j]/=2;
				}
				countTimes++;
			}
			else
			{
				System.out.print(countTimes);
				break;
			}
		}	
	} int countTimes=0; countTimes 0 while(true)
		{
			int count=0;
			for(int i=0;i<num;i++)
			{
				if(box[i]%2==0)
					count++;
			}
			if(count==num)
			{
				for(int j=0;j<num;j++)
				{
					box[j]/=2;
				}
				countTimes++;
			}
			else
			{
				System.out.print(countTimes);
				break;
			}
		} true {
			int count=0;
			for(int i=0;i<num;i++)
			{
				if(box[i]%2==0)
					count++;
			}
			if(count==num)
			{
				for(int j=0;j<num;j++)
				{
					box[j]/=2;
				}
				countTimes++;
			}
			else
			{
				System.out.print(countTimes);
				break;
			}
		} int count=0; count 0 for(int i=0;i<num;i++)
			{
				if(box[i]%2==0)
					count++;
			} int i=0; int i=0; i 0 i<num i num i++ i++ i {
				if(box[i]%2==0)
					count++;
			} {
				if(box[i]%2==0)
					count++;
			} if(box[i]%2==0)
					count++; box[i]%2==0 box[i]%2 box[i] box i 2 0 count++ count if(count==num)
			{
				for(int j=0;j<num;j++)
				{
					box[j]/=2;
				}
				countTimes++;
			}
			else
			{
				System.out.print(countTimes);
				break;
			} count==num count num {
				for(int j=0;j<num;j++)
				{
					box[j]/=2;
				}
				countTimes++;
			} for(int j=0;j<num;j++)
				{
					box[j]/=2;
				} int j=0; int j=0; j 0 j<num j num j++ j++ j {
					box[j]/=2;
				} {
					box[j]/=2;
				} box[j]/=2 box[j] box j 2 countTimes++ countTimes {
				System.out.print(countTimes);
				break;
			} System.out.print(countTimes) System.out.print System.out System System.out countTimes break; long[] box box int num num
import java.util.*;
class Main
{
	public static void main(String[] args)
	{
		Scanner sc=new Scanner(System.in);
		int number=sc.nextInt();
		long []numberBox=new long[number];
		int error=0;
		for(int i=0;i<number;i++)
		{
			numberBox[i]=sc.nextInt();
			if(numberBox[i]==0)
			{
				error=1;
			}	
		}
		if(error==0)
		{
			checkEven(numberBox,number);
		}	
		else
		{
			System.out.print("0");
		}	
		
	}
	static void checkEven(long[] box,int num)
	{
		int countTimes=0;
		while(true)
		{
			int count=0;
			for(int i=0;i<num;i++)
			{
				if(box[i]%2==0)
					count++;
			}
			if(count==num)
			{
				for(int j=0;j<num;j++)
				{
					box[j]/=2;
				}
				countTimes++;
			}
			else
			{
				System.out.print(countTimes);
				break;
			}
		}	
	}
}