import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int list[] = new int[N];
		for (int i = 0; i < N; i++) {
			list[i] = sc.nextInt();
		}
		int cntList[] = new int[N];

		//2で割った際に余りが出るか
		//2で割った商に2で割った際に余りが出るか（繰り返し）
		//すべての要素で行った回数の中で最小の数

		for (int i = 0; i < N; i++) {
			int cnt = 0;
			while (list[i] % 2 == 0) {
				list[i] = list[i] / 2;
				cnt++;
			}
			cntList[i] = cnt;
		}

		int ans = cntList[0];
		for (int i = 1; i < N; i++) {
			if (ans > cntList[i]) {
				ans = cntList[i];
			}
		}
		System.out.println(ans);
	}
} 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 list[] = new int[N];
		for (int i = 0; i < N; i++) {
			list[i] = sc.nextInt();
		}
		int cntList[] = new int[N];

		//2で割った際に余りが出るか
		//2で割った商に2で割った際に余りが出るか（繰り返し）
		//すべての要素で行った回数の中で最小の数

		for (int i = 0; i < N; i++) {
			int cnt = 0;
			while (list[i] % 2 == 0) {
				list[i] = list[i] / 2;
				cnt++;
			}
			cntList[i] = cnt;
		}

		int ans = cntList[0];
		for (int i = 1; i < N; i++) {
			if (ans > cntList[i]) {
				ans = cntList[i];
			}
		}
		System.out.println(ans);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int list[] = new int[N];
		for (int i = 0; i < N; i++) {
			list[i] = sc.nextInt();
		}
		int cntList[] = new int[N];

		//2で割った際に余りが出るか
		//2で割った商に2で割った際に余りが出るか（繰り返し）
		//すべての要素で行った回数の中で最小の数

		for (int i = 0; i < N; i++) {
			int cnt = 0;
			while (list[i] % 2 == 0) {
				list[i] = list[i] / 2;
				cnt++;
			}
			cntList[i] = cnt;
		}

		int ans = cntList[0];
		for (int i = 1; i < N; i++) {
			if (ans > cntList[i]) {
				ans = cntList[i];
			}
		}
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int list[] = new int[N];
		for (int i = 0; i < N; i++) {
			list[i] = sc.nextInt();
		}
		int cntList[] = new int[N];

		//2で割った際に余りが出るか
		//2で割った商に2で割った際に余りが出るか（繰り返し）
		//すべての要素で行った回数の中で最小の数

		for (int i = 0; i < N; i++) {
			int cnt = 0;
			while (list[i] % 2 == 0) {
				list[i] = list[i] / 2;
				cnt++;
			}
			cntList[i] = cnt;
		}

		int ans = cntList[0];
		for (int i = 1; i < N; i++) {
			if (ans > cntList[i]) {
				ans = cntList[i];
			}
		}
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int list[] = new int[N]; list new int[N] N for (int i = 0; i < N; i++) {
			list[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			list[i] = sc.nextInt();
		} {
			list[i] = sc.nextInt();
		} list[i] = sc.nextInt() list[i] list i sc.nextInt() sc.nextInt sc int cntList[] = new int[N]; cntList new int[N] N for (int i = 0; i < N; i++) {
			int cnt = 0;
			while (list[i] % 2 == 0) {
				list[i] = list[i] / 2;
				cnt++;
			}
			cntList[i] = cnt;
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			int cnt = 0;
			while (list[i] % 2 == 0) {
				list[i] = list[i] / 2;
				cnt++;
			}
			cntList[i] = cnt;
		} {
			int cnt = 0;
			while (list[i] % 2 == 0) {
				list[i] = list[i] / 2;
				cnt++;
			}
			cntList[i] = cnt;
		} int cnt = 0; cnt 0 while (list[i] % 2 == 0) {
				list[i] = list[i] / 2;
				cnt++;
			} list[i] % 2 == 0 list[i] % 2 list[i] list i 2 0 {
				list[i] = list[i] / 2;
				cnt++;
			} list[i] = list[i] / 2 list[i] list i list[i] / 2 list[i] list i 2 cnt++ cnt cntList[i] = cnt cntList[i] cntList i cnt int ans = cntList[0]; ans cntList[0] cntList 0 for (int i = 1; i < N; i++) {
			if (ans > cntList[i]) {
				ans = cntList[i];
			}
		} int i = 1; int i = 1; i 1 i < N i N i++ i++ i {
			if (ans > cntList[i]) {
				ans = cntList[i];
			}
		} {
			if (ans > cntList[i]) {
				ans = cntList[i];
			}
		} if (ans > cntList[i]) {
				ans = cntList[i];
			} ans > cntList[i] ans cntList[i] cntList i {
				ans = cntList[i];
			} ans = cntList[i] ans cntList[i] cntList i System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int list[] = new int[N];
		for (int i = 0; i < N; i++) {
			list[i] = sc.nextInt();
		}
		int cntList[] = new int[N];

		//2で割った際に余りが出るか
		//2で割った商に2で割った際に余りが出るか（繰り返し）
		//すべての要素で行った回数の中で最小の数

		for (int i = 0; i < N; i++) {
			int cnt = 0;
			while (list[i] % 2 == 0) {
				list[i] = list[i] / 2;
				cnt++;
			}
			cntList[i] = cnt;
		}

		int ans = cntList[0];
		for (int i = 1; i < N; i++) {
			if (ans > cntList[i]) {
				ans = cntList[i];
			}
		}
		System.out.println(ans);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int list[] = new int[N];
		for (int i = 0; i < N; i++) {
			list[i] = sc.nextInt();
		}
		int cntList[] = new int[N];

		//2で割った際に余りが出るか
		//2で割った商に2で割った際に余りが出るか（繰り返し）
		//すべての要素で行った回数の中で最小の数

		for (int i = 0; i < N; i++) {
			int cnt = 0;
			while (list[i] % 2 == 0) {
				list[i] = list[i] / 2;
				cnt++;
			}
			cntList[i] = cnt;
		}

		int ans = cntList[0];
		for (int i = 1; i < N; i++) {
			if (ans > cntList[i]) {
				ans = cntList[i];
			}
		}
		System.out.println(ans);
	}
} 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 list[] = new int[N];
		for (int i = 0; i < N; i++) {
			list[i] = sc.nextInt();
		}
		int cntList[] = new int[N];

		//2で割った際に余りが出るか
		//2で割った商に2で割った際に余りが出るか（繰り返し）
		//すべての要素で行った回数の中で最小の数

		for (int i = 0; i < N; i++) {
			int cnt = 0;
			while (list[i] % 2 == 0) {
				list[i] = list[i] / 2;
				cnt++;
			}
			cntList[i] = cnt;
		}

		int ans = cntList[0];
		for (int i = 1; i < N; i++) {
			if (ans > cntList[i]) {
				ans = cntList[i];
			}
		}
		System.out.println(ans);
	}
}