import java.util.*;

public class Main 
{
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		
		int n = scan.nextInt();
		
		int min = 10000;
		
		for(int i = 0; i < n; i++)
		{
			
			int a = scan.nextInt();
			int count = 0;
			while(a%2 == 0)
			{
				a = a/2;
				count++;
			}
			if(count < min)min = count;
		}
		System.out.println(min);
		scan.close();
	}
} import java.util.*; util.* java public class Main 
{
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		
		int n = scan.nextInt();
		
		int min = 10000;
		
		for(int i = 0; i < n; i++)
		{
			
			int a = scan.nextInt();
			int count = 0;
			while(a%2 == 0)
			{
				a = a/2;
				count++;
			}
			if(count < min)min = count;
		}
		System.out.println(min);
		scan.close();
	}
} Main public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		
		int n = scan.nextInt();
		
		int min = 10000;
		
		for(int i = 0; i < n; i++)
		{
			
			int a = scan.nextInt();
			int count = 0;
			while(a%2 == 0)
			{
				a = a/2;
				count++;
			}
			if(count < min)min = count;
		}
		System.out.println(min);
		scan.close();
	} main {
		Scanner scan = new Scanner(System.in);
		
		int n = scan.nextInt();
		
		int min = 10000;
		
		for(int i = 0; i < n; i++)
		{
			
			int a = scan.nextInt();
			int count = 0;
			while(a%2 == 0)
			{
				a = a/2;
				count++;
			}
			if(count < min)min = count;
		}
		System.out.println(min);
		scan.close();
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int min = 10000; min 10000 for(int i = 0; i < n; i++)
		{
			
			int a = scan.nextInt();
			int count = 0;
			while(a%2 == 0)
			{
				a = a/2;
				count++;
			}
			if(count < min)min = count;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			
			int a = scan.nextInt();
			int count = 0;
			while(a%2 == 0)
			{
				a = a/2;
				count++;
			}
			if(count < min)min = count;
		} {
			
			int a = scan.nextInt();
			int count = 0;
			while(a%2 == 0)
			{
				a = a/2;
				count++;
			}
			if(count < min)min = count;
		} int a = scan.nextInt(); a scan.nextInt() scan.nextInt scan int count = 0; count 0 while(a%2 == 0)
			{
				a = a/2;
				count++;
			} a%2 == 0 a%2 a 2 0 {
				a = a/2;
				count++;
			} a = a/2 a a/2 a 2 count++ count if(count < min)min = count; count < min count min min = count min count System.out.println(min) System.out.println System.out System System.out min scan.close() scan.close scan String[] args args public class Main 
{
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		
		int n = scan.nextInt();
		
		int min = 10000;
		
		for(int i = 0; i < n; i++)
		{
			
			int a = scan.nextInt();
			int count = 0;
			while(a%2 == 0)
			{
				a = a/2;
				count++;
			}
			if(count < min)min = count;
		}
		System.out.println(min);
		scan.close();
	}
} public class Main 
{
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		
		int n = scan.nextInt();
		
		int min = 10000;
		
		for(int i = 0; i < n; i++)
		{
			
			int a = scan.nextInt();
			int count = 0;
			while(a%2 == 0)
			{
				a = a/2;
				count++;
			}
			if(count < min)min = count;
		}
		System.out.println(min);
		scan.close();
	}
} Main
import java.util.*;

public class Main 
{
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		
		int n = scan.nextInt();
		
		int min = 10000;
		
		for(int i = 0; i < n; i++)
		{
			
			int a = scan.nextInt();
			int count = 0;
			while(a%2 == 0)
			{
				a = a/2;
				count++;
			}
			if(count < min)min = count;
		}
		System.out.println(min);
		scan.close();
	}
}