import java.util.Scanner;

public class Main {

	public static void main(String... nui) {
		
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		
		int min = (int) 1e9;
		
		for (int i = 0; i < n; i++) {
			
			int a = sc.nextInt();
			
			int cnt = 0;
			
			while (a % 2 == 0) {
				
				a /= 2;
				cnt++;
				
			}
			
			min = Math.min(min, cnt);
			
		}
		
		System.out.println(min);
		
	}

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

	public static void main(String... nui) {
		
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		
		int min = (int) 1e9;
		
		for (int i = 0; i < n; i++) {
			
			int a = sc.nextInt();
			
			int cnt = 0;
			
			while (a % 2 == 0) {
				
				a /= 2;
				cnt++;
				
			}
			
			min = Math.min(min, cnt);
			
		}
		
		System.out.println(min);
		
	}

} Main public static void main(String... nui) {
		
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		
		int min = (int) 1e9;
		
		for (int i = 0; i < n; i++) {
			
			int a = sc.nextInt();
			
			int cnt = 0;
			
			while (a % 2 == 0) {
				
				a /= 2;
				cnt++;
				
			}
			
			min = Math.min(min, cnt);
			
		}
		
		System.out.println(min);
		
	} main {
		
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		
		int min = (int) 1e9;
		
		for (int i = 0; i < n; i++) {
			
			int a = sc.nextInt();
			
			int cnt = 0;
			
			while (a % 2 == 0) {
				
				a /= 2;
				cnt++;
				
			}
			
			min = Math.min(min, cnt);
			
		}
		
		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 = (int) 1e9; min (int) 1e9 for (int i = 0; i < n; i++) {
			
			int a = sc.nextInt();
			
			int cnt = 0;
			
			while (a % 2 == 0) {
				
				a /= 2;
				cnt++;
				
			}
			
			min = Math.min(min, cnt);
			
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			
			int a = sc.nextInt();
			
			int cnt = 0;
			
			while (a % 2 == 0) {
				
				a /= 2;
				cnt++;
				
			}
			
			min = Math.min(min, cnt);
			
		} {
			
			int a = sc.nextInt();
			
			int cnt = 0;
			
			while (a % 2 == 0) {
				
				a /= 2;
				cnt++;
				
			}
			
			min = Math.min(min, cnt);
			
		} int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int cnt = 0; cnt 0 while (a % 2 == 0) {
				
				a /= 2;
				cnt++;
				
			} a % 2 == 0 a % 2 a 2 0 {
				
				a /= 2;
				cnt++;
				
			} a /= 2 a 2 cnt++ cnt min = Math.min(min, cnt) min Math.min(min, cnt) Math.min Math min cnt System.out.println(min) System.out.println System.out System System.out min String... nui nui public class Main {

	public static void main(String... nui) {
		
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		
		int min = (int) 1e9;
		
		for (int i = 0; i < n; i++) {
			
			int a = sc.nextInt();
			
			int cnt = 0;
			
			while (a % 2 == 0) {
				
				a /= 2;
				cnt++;
				
			}
			
			min = Math.min(min, cnt);
			
		}
		
		System.out.println(min);
		
	}

} public class Main {

	public static void main(String... nui) {
		
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		
		int min = (int) 1e9;
		
		for (int i = 0; i < n; i++) {
			
			int a = sc.nextInt();
			
			int cnt = 0;
			
			while (a % 2 == 0) {
				
				a /= 2;
				cnt++;
				
			}
			
			min = Math.min(min, cnt);
			
		}
		
		System.out.println(min);
		
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String... nui) {
		
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		
		int min = (int) 1e9;
		
		for (int i = 0; i < n; i++) {
			
			int a = sc.nextInt();
			
			int cnt = 0;
			
			while (a % 2 == 0) {
				
				a /= 2;
				cnt++;
				
			}
			
			min = Math.min(min, cnt);
			
		}
		
		System.out.println(min);
		
	}

}
