import java.util.Scanner;

public class Main {
	
	public static void main(String[] args) {
		Scanner kb = new Scanner(System.in);
		int n = kb.nextInt();
		
		int[]numA = new int[n];
		
		boolean exist_odd = false;
		
		for(int i=0; i< n; i++) {
			numA[i] = kb.nextInt();
			if(numA[i]%2 == 1)
				exist_odd = true;
		}
		if(exist_odd == true) 
			System.out.println(0);
		else {
			int min = Integer.MAX_VALUE;
			for(int i=0; i< n; i++) {
				int ans = 0;
				while(numA[i] %2 == 0) { 
					numA[i] /= 2;
					ans++;
				}
				min = Math.min(min, ans);
			}
			System.out.println(min);
		}
		kb.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	
	public static void main(String[] args) {
		Scanner kb = new Scanner(System.in);
		int n = kb.nextInt();
		
		int[]numA = new int[n];
		
		boolean exist_odd = false;
		
		for(int i=0; i< n; i++) {
			numA[i] = kb.nextInt();
			if(numA[i]%2 == 1)
				exist_odd = true;
		}
		if(exist_odd == true) 
			System.out.println(0);
		else {
			int min = Integer.MAX_VALUE;
			for(int i=0; i< n; i++) {
				int ans = 0;
				while(numA[i] %2 == 0) { 
					numA[i] /= 2;
					ans++;
				}
				min = Math.min(min, ans);
			}
			System.out.println(min);
		}
		kb.close();
	}
} Main public static void main(String[] args) {
		Scanner kb = new Scanner(System.in);
		int n = kb.nextInt();
		
		int[]numA = new int[n];
		
		boolean exist_odd = false;
		
		for(int i=0; i< n; i++) {
			numA[i] = kb.nextInt();
			if(numA[i]%2 == 1)
				exist_odd = true;
		}
		if(exist_odd == true) 
			System.out.println(0);
		else {
			int min = Integer.MAX_VALUE;
			for(int i=0; i< n; i++) {
				int ans = 0;
				while(numA[i] %2 == 0) { 
					numA[i] /= 2;
					ans++;
				}
				min = Math.min(min, ans);
			}
			System.out.println(min);
		}
		kb.close();
	} main {
		Scanner kb = new Scanner(System.in);
		int n = kb.nextInt();
		
		int[]numA = new int[n];
		
		boolean exist_odd = false;
		
		for(int i=0; i< n; i++) {
			numA[i] = kb.nextInt();
			if(numA[i]%2 == 1)
				exist_odd = true;
		}
		if(exist_odd == true) 
			System.out.println(0);
		else {
			int min = Integer.MAX_VALUE;
			for(int i=0; i< n; i++) {
				int ans = 0;
				while(numA[i] %2 == 0) { 
					numA[i] /= 2;
					ans++;
				}
				min = Math.min(min, ans);
			}
			System.out.println(min);
		}
		kb.close();
	} Scanner kb = new Scanner(System.in); kb new Scanner(System.in) int n = kb.nextInt(); n kb.nextInt() kb.nextInt kb int[]numA = new int[n]; numA new int[n] n boolean exist_odd = false; exist_odd false for(int i=0; i< n; i++) {
			numA[i] = kb.nextInt();
			if(numA[i]%2 == 1)
				exist_odd = true;
		} int i=0; int i=0; i 0 i< n i n i++ i++ i {
			numA[i] = kb.nextInt();
			if(numA[i]%2 == 1)
				exist_odd = true;
		} {
			numA[i] = kb.nextInt();
			if(numA[i]%2 == 1)
				exist_odd = true;
		} numA[i] = kb.nextInt() numA[i] numA i kb.nextInt() kb.nextInt kb if(numA[i]%2 == 1)
				exist_odd = true; numA[i]%2 == 1 numA[i]%2 numA[i] numA i 2 1 exist_odd = true exist_odd true if(exist_odd == true) 
			System.out.println(0);
		else {
			int min = Integer.MAX_VALUE;
			for(int i=0; i< n; i++) {
				int ans = 0;
				while(numA[i] %2 == 0) { 
					numA[i] /= 2;
					ans++;
				}
				min = Math.min(min, ans);
			}
			System.out.println(min);
		} exist_odd == true exist_odd true System.out.println(0) System.out.println System.out System System.out 0 {
			int min = Integer.MAX_VALUE;
			for(int i=0; i< n; i++) {
				int ans = 0;
				while(numA[i] %2 == 0) { 
					numA[i] /= 2;
					ans++;
				}
				min = Math.min(min, ans);
			}
			System.out.println(min);
		} int min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE for(int i=0; i< n; i++) {
				int ans = 0;
				while(numA[i] %2 == 0) { 
					numA[i] /= 2;
					ans++;
				}
				min = Math.min(min, ans);
			} int i=0; int i=0; i 0 i< n i n i++ i++ i {
				int ans = 0;
				while(numA[i] %2 == 0) { 
					numA[i] /= 2;
					ans++;
				}
				min = Math.min(min, ans);
			} {
				int ans = 0;
				while(numA[i] %2 == 0) { 
					numA[i] /= 2;
					ans++;
				}
				min = Math.min(min, ans);
			} int ans = 0; ans 0 while(numA[i] %2 == 0) { 
					numA[i] /= 2;
					ans++;
				} numA[i] %2 == 0 numA[i] %2 numA[i] numA i 2 0 { 
					numA[i] /= 2;
					ans++;
				} numA[i] /= 2 numA[i] numA i 2 ans++ ans min = Math.min(min, ans) min Math.min(min, ans) Math.min Math min ans System.out.println(min) System.out.println System.out System System.out min kb.close() kb.close kb String[] args args public class Main {
	
	public static void main(String[] args) {
		Scanner kb = new Scanner(System.in);
		int n = kb.nextInt();
		
		int[]numA = new int[n];
		
		boolean exist_odd = false;
		
		for(int i=0; i< n; i++) {
			numA[i] = kb.nextInt();
			if(numA[i]%2 == 1)
				exist_odd = true;
		}
		if(exist_odd == true) 
			System.out.println(0);
		else {
			int min = Integer.MAX_VALUE;
			for(int i=0; i< n; i++) {
				int ans = 0;
				while(numA[i] %2 == 0) { 
					numA[i] /= 2;
					ans++;
				}
				min = Math.min(min, ans);
			}
			System.out.println(min);
		}
		kb.close();
	}
} public class Main {
	
	public static void main(String[] args) {
		Scanner kb = new Scanner(System.in);
		int n = kb.nextInt();
		
		int[]numA = new int[n];
		
		boolean exist_odd = false;
		
		for(int i=0; i< n; i++) {
			numA[i] = kb.nextInt();
			if(numA[i]%2 == 1)
				exist_odd = true;
		}
		if(exist_odd == true) 
			System.out.println(0);
		else {
			int min = Integer.MAX_VALUE;
			for(int i=0; i< n; i++) {
				int ans = 0;
				while(numA[i] %2 == 0) { 
					numA[i] /= 2;
					ans++;
				}
				min = Math.min(min, ans);
			}
			System.out.println(min);
		}
		kb.close();
	}
} Main
import java.util.Scanner;

public class Main {
	
	public static void main(String[] args) {
		Scanner kb = new Scanner(System.in);
		int n = kb.nextInt();
		
		int[]numA = new int[n];
		
		boolean exist_odd = false;
		
		for(int i=0; i< n; i++) {
			numA[i] = kb.nextInt();
			if(numA[i]%2 == 1)
				exist_odd = true;
		}
		if(exist_odd == true) 
			System.out.println(0);
		else {
			int min = Integer.MAX_VALUE;
			for(int i=0; i< n; i++) {
				int ans = 0;
				while(numA[i] %2 == 0) { 
					numA[i] /= 2;
					ans++;
				}
				min = Math.min(min, ans);
			}
			System.out.println(min);
		}
		kb.close();
	}
}