import java.util.*;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
      	int minDivTwo = 1000;
    	for(int i=0; i<n; i++){
          	int v = sc.nextInt();
			int c = 0;
          	while(v > 0 && v%2 == 0)	{
            	v/=2;
	            c++;
	        }
            minDivTwo = Math.min(c, minDivTwo);
        }
        System.out.println(minDivTwo);
    }
} import java.util.*; util.* java public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
      	int minDivTwo = 1000;
    	for(int i=0; i<n; i++){
          	int v = sc.nextInt();
			int c = 0;
          	while(v > 0 && v%2 == 0)	{
            	v/=2;
	            c++;
	        }
            minDivTwo = Math.min(c, minDivTwo);
        }
        System.out.println(minDivTwo);
    }
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
      	int minDivTwo = 1000;
    	for(int i=0; i<n; i++){
          	int v = sc.nextInt();
			int c = 0;
          	while(v > 0 && v%2 == 0)	{
            	v/=2;
	            c++;
	        }
            minDivTwo = Math.min(c, minDivTwo);
        }
        System.out.println(minDivTwo);
    } main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
      	int minDivTwo = 1000;
    	for(int i=0; i<n; i++){
          	int v = sc.nextInt();
			int c = 0;
          	while(v > 0 && v%2 == 0)	{
            	v/=2;
	            c++;
	        }
            minDivTwo = Math.min(c, minDivTwo);
        }
        System.out.println(minDivTwo);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int minDivTwo = 1000; minDivTwo 1000 for(int i=0; i<n; i++){
          	int v = sc.nextInt();
			int c = 0;
          	while(v > 0 && v%2 == 0)	{
            	v/=2;
	            c++;
	        }
            minDivTwo = Math.min(c, minDivTwo);
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
          	int v = sc.nextInt();
			int c = 0;
          	while(v > 0 && v%2 == 0)	{
            	v/=2;
	            c++;
	        }
            minDivTwo = Math.min(c, minDivTwo);
        } {
          	int v = sc.nextInt();
			int c = 0;
          	while(v > 0 && v%2 == 0)	{
            	v/=2;
	            c++;
	        }
            minDivTwo = Math.min(c, minDivTwo);
        } int v = sc.nextInt(); v sc.nextInt() sc.nextInt sc int c = 0; c 0 while(v > 0 && v%2 == 0)	{
            	v/=2;
	            c++;
	        } v > 0 && v%2 == 0 v > 0 v 0 v%2 == 0 v%2 v 2 0 {
            	v/=2;
	            c++;
	        } v/=2 v 2 c++ c minDivTwo = Math.min(c, minDivTwo) minDivTwo Math.min(c, minDivTwo) Math.min Math c minDivTwo System.out.println(minDivTwo) System.out.println System.out System System.out minDivTwo String[] args args public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
      	int minDivTwo = 1000;
    	for(int i=0; i<n; i++){
          	int v = sc.nextInt();
			int c = 0;
          	while(v > 0 && v%2 == 0)	{
            	v/=2;
	            c++;
	        }
            minDivTwo = Math.min(c, minDivTwo);
        }
        System.out.println(minDivTwo);
    }
} public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
      	int minDivTwo = 1000;
    	for(int i=0; i<n; i++){
          	int v = sc.nextInt();
			int c = 0;
          	while(v > 0 && v%2 == 0)	{
            	v/=2;
	            c++;
	        }
            minDivTwo = Math.min(c, minDivTwo);
        }
        System.out.println(minDivTwo);
    }
} Main
import java.util.*;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
      	int minDivTwo = 1000;
    	for(int i=0; i<n; i++){
          	int v = sc.nextInt();
			int c = 0;
          	while(v > 0 && v%2 == 0)	{
            	v/=2;
	            c++;
	        }
            minDivTwo = Math.min(c, minDivTwo);
        }
        System.out.println(minDivTwo);
    }
}
