import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] input = new int[N];
		for(int i = 0;i<N;i++) {
			input[i]=sc.nextInt();
		}
		int res=Integer.MAX_VALUE;
		for(int i = 0;i<N;i++) {
			int count=0;
			while(input[i]%2==0) {
				input[i]/=2;
				count++;
			}
			if(count<res) {
				res=count;
			}
		}
		System.out.println(res);


	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] input = new int[N];
		for(int i = 0;i<N;i++) {
			input[i]=sc.nextInt();
		}
		int res=Integer.MAX_VALUE;
		for(int i = 0;i<N;i++) {
			int count=0;
			while(input[i]%2==0) {
				input[i]/=2;
				count++;
			}
			if(count<res) {
				res=count;
			}
		}
		System.out.println(res);


	}
} Main public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] input = new int[N];
		for(int i = 0;i<N;i++) {
			input[i]=sc.nextInt();
		}
		int res=Integer.MAX_VALUE;
		for(int i = 0;i<N;i++) {
			int count=0;
			while(input[i]%2==0) {
				input[i]/=2;
				count++;
			}
			if(count<res) {
				res=count;
			}
		}
		System.out.println(res);


	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] input = new int[N];
		for(int i = 0;i<N;i++) {
			input[i]=sc.nextInt();
		}
		int res=Integer.MAX_VALUE;
		for(int i = 0;i<N;i++) {
			int count=0;
			while(input[i]%2==0) {
				input[i]/=2;
				count++;
			}
			if(count<res) {
				res=count;
			}
		}
		System.out.println(res);


	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int[] input = new int[N]; input new int[N] N for(int i = 0;i<N;i++) {
			input[i]=sc.nextInt();
		} int i = 0; int i = 0; i 0 i<N i N i++ i++ i {
			input[i]=sc.nextInt();
		} {
			input[i]=sc.nextInt();
		} input[i]=sc.nextInt() input[i] input i sc.nextInt() sc.nextInt sc int res=Integer.MAX_VALUE; res Integer.MAX_VALUE Integer Integer.MAX_VALUE for(int i = 0;i<N;i++) {
			int count=0;
			while(input[i]%2==0) {
				input[i]/=2;
				count++;
			}
			if(count<res) {
				res=count;
			}
		} int i = 0; int i = 0; i 0 i<N i N i++ i++ i {
			int count=0;
			while(input[i]%2==0) {
				input[i]/=2;
				count++;
			}
			if(count<res) {
				res=count;
			}
		} {
			int count=0;
			while(input[i]%2==0) {
				input[i]/=2;
				count++;
			}
			if(count<res) {
				res=count;
			}
		} int count=0; count 0 while(input[i]%2==0) {
				input[i]/=2;
				count++;
			} input[i]%2==0 input[i]%2 input[i] input i 2 0 {
				input[i]/=2;
				count++;
			} input[i]/=2 input[i] input i 2 count++ count if(count<res) {
				res=count;
			} count<res count res {
				res=count;
			} res=count res count System.out.println(res) System.out.println System.out System System.out res String[] args args public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] input = new int[N];
		for(int i = 0;i<N;i++) {
			input[i]=sc.nextInt();
		}
		int res=Integer.MAX_VALUE;
		for(int i = 0;i<N;i++) {
			int count=0;
			while(input[i]%2==0) {
				input[i]/=2;
				count++;
			}
			if(count<res) {
				res=count;
			}
		}
		System.out.println(res);


	}
} public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] input = new int[N];
		for(int i = 0;i<N;i++) {
			input[i]=sc.nextInt();
		}
		int res=Integer.MAX_VALUE;
		for(int i = 0;i<N;i++) {
			int count=0;
			while(input[i]%2==0) {
				input[i]/=2;
				count++;
			}
			if(count<res) {
				res=count;
			}
		}
		System.out.println(res);


	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] input = new int[N];
		for(int i = 0;i<N;i++) {
			input[i]=sc.nextInt();
		}
		int res=Integer.MAX_VALUE;
		for(int i = 0;i<N;i++) {
			int count=0;
			while(input[i]%2==0) {
				input[i]/=2;
				count++;
			}
			if(count<res) {
				res=count;
			}
		}
		System.out.println(res);


	}
}