import java.util.*;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		
		int min = Integer.MAX_VALUE;
		for(int i=0;i<n;i++){
			int a = sc.nextInt();
			int c = 0;
			while(a%2==0){
				a/=2;
				c++;
			}
			if(c<min)
				min = c;
		}
		
		System.out.println(min);
	}

} 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 min = Integer.MAX_VALUE;
		for(int i=0;i<n;i++){
			int a = sc.nextInt();
			int c = 0;
			while(a%2==0){
				a/=2;
				c++;
			}
			if(c<min)
				min = c;
		}
		
		System.out.println(min);
	}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		
		int min = Integer.MAX_VALUE;
		for(int i=0;i<n;i++){
			int a = sc.nextInt();
			int c = 0;
			while(a%2==0){
				a/=2;
				c++;
			}
			if(c<min)
				min = c;
		}
		
		System.out.println(min);
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		
		int min = Integer.MAX_VALUE;
		for(int i=0;i<n;i++){
			int a = sc.nextInt();
			int c = 0;
			while(a%2==0){
				a/=2;
				c++;
			}
			if(c<min)
				min = c;
		}
		
		System.out.println(min);
	}

} Main
import java.util.*;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		
		int min = Integer.MAX_VALUE;
		for(int i=0;i<n;i++){
			int a = sc.nextInt();
			int c = 0;
			while(a%2==0){
				a/=2;
				c++;
			}
			if(c<min)
				min = c;
		}
		
		System.out.println(min);
	}

}
