import java.util.Scanner;

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

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