import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int min =1000000000;
		for(int i=0;i<n;i++) {
			int a = sc.nextInt();
			int cut = 0;
			while(a%2 ==0) {
				cut++;
				a/=2;
			}
			min = Math.min(min, cut);
		}
		System.out.println(min);
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int min =1000000000;
		for(int i=0;i<n;i++) {
			int a = sc.nextInt();
			int cut = 0;
			while(a%2 ==0) {
				cut++;
				a/=2;
			}
			min = Math.min(min, cut);
		}
		System.out.println(min);
	}
} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int min =1000000000;
		for(int i=0;i<n;i++) {
			int a = sc.nextInt();
			int cut = 0;
			while(a%2 ==0) {
				cut++;
				a/=2;
			}
			min = Math.min(min, cut);
		}
		System.out.println(min);
	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int min =1000000000;
		for(int i=0;i<n;i++) {
			int a = sc.nextInt();
			int cut = 0;
			while(a%2 ==0) {
				cut++;
				a/=2;
			}
			min = Math.min(min, cut);
		}
		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 =1000000000; min 1000000000 for(int i=0;i<n;i++) {
			int a = sc.nextInt();
			int cut = 0;
			while(a%2 ==0) {
				cut++;
				a/=2;
			}
			min = Math.min(min, cut);
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			int a = sc.nextInt();
			int cut = 0;
			while(a%2 ==0) {
				cut++;
				a/=2;
			}
			min = Math.min(min, cut);
		} {
			int a = sc.nextInt();
			int cut = 0;
			while(a%2 ==0) {
				cut++;
				a/=2;
			}
			min = Math.min(min, cut);
		} int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int cut = 0; cut 0 while(a%2 ==0) {
				cut++;
				a/=2;
			} a%2 ==0 a%2 a 2 0 {
				cut++;
				a/=2;
			} cut++ cut a/=2 a 2 min = Math.min(min, cut) min Math.min(min, cut) Math.min Math min cut 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) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int min =1000000000;
		for(int i=0;i<n;i++) {
			int a = sc.nextInt();
			int cut = 0;
			while(a%2 ==0) {
				cut++;
				a/=2;
			}
			min = Math.min(min, cut);
		}
		System.out.println(min);
	}
} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int min =1000000000;
		for(int i=0;i<n;i++) {
			int a = sc.nextInt();
			int cut = 0;
			while(a%2 ==0) {
				cut++;
				a/=2;
			}
			min = Math.min(min, cut);
		}
		System.out.println(min);
	}
} Main
import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int min =1000000000;
		for(int i=0;i<n;i++) {
			int a = sc.nextInt();
			int cut = 0;
			while(a%2 ==0) {
				cut++;
				a/=2;
			}
			min = Math.min(min, cut);
		}
		System.out.println(min);
	}
}