//第 4 問: ABC 087 B - Coinsi (200 点)

import java.util.Scanner;

public class Main{

	public static void main(String[] args){

		Scanner scan = new Scanner(System.in);

		int N = scan.nextInt();
		scan.nextLine();

		int arr[] = new int[N];
		int flag = 1;
		int count = 0;

		for(int i=0; i<N; i++) {
			arr[i] = scan.nextInt();
		}

		while(flag==1) {

			for(int i=0; i<N; i++) {

				if(count==0 && arr[i]%2 == 1) {
					flag = 0;
					count= -1;
					break;
				}

				arr[i] = arr[i]/2;

				if(arr[i]%2 == 1) {
					flag = 0;
				}

			}

			++count;

		}

		System.out.println(count);

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

	public static void main(String[] args){

		Scanner scan = new Scanner(System.in);

		int N = scan.nextInt();
		scan.nextLine();

		int arr[] = new int[N];
		int flag = 1;
		int count = 0;

		for(int i=0; i<N; i++) {
			arr[i] = scan.nextInt();
		}

		while(flag==1) {

			for(int i=0; i<N; i++) {

				if(count==0 && arr[i]%2 == 1) {
					flag = 0;
					count= -1;
					break;
				}

				arr[i] = arr[i]/2;

				if(arr[i]%2 == 1) {
					flag = 0;
				}

			}

			++count;

		}

		System.out.println(count);

	}
} Main public static void main(String[] args){

		Scanner scan = new Scanner(System.in);

		int N = scan.nextInt();
		scan.nextLine();

		int arr[] = new int[N];
		int flag = 1;
		int count = 0;

		for(int i=0; i<N; i++) {
			arr[i] = scan.nextInt();
		}

		while(flag==1) {

			for(int i=0; i<N; i++) {

				if(count==0 && arr[i]%2 == 1) {
					flag = 0;
					count= -1;
					break;
				}

				arr[i] = arr[i]/2;

				if(arr[i]%2 == 1) {
					flag = 0;
				}

			}

			++count;

		}

		System.out.println(count);

	} main {

		Scanner scan = new Scanner(System.in);

		int N = scan.nextInt();
		scan.nextLine();

		int arr[] = new int[N];
		int flag = 1;
		int count = 0;

		for(int i=0; i<N; i++) {
			arr[i] = scan.nextInt();
		}

		while(flag==1) {

			for(int i=0; i<N; i++) {

				if(count==0 && arr[i]%2 == 1) {
					flag = 0;
					count= -1;
					break;
				}

				arr[i] = arr[i]/2;

				if(arr[i]%2 == 1) {
					flag = 0;
				}

			}

			++count;

		}

		System.out.println(count);

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan scan.nextLine() scan.nextLine scan int arr[] = new int[N]; arr new int[N] N int flag = 1; flag 1 int count = 0; count 0 for(int i=0; i<N; i++) {
			arr[i] = scan.nextInt();
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
			arr[i] = scan.nextInt();
		} {
			arr[i] = scan.nextInt();
		} arr[i] = scan.nextInt() arr[i] arr i scan.nextInt() scan.nextInt scan while(flag==1) {

			for(int i=0; i<N; i++) {

				if(count==0 && arr[i]%2 == 1) {
					flag = 0;
					count= -1;
					break;
				}

				arr[i] = arr[i]/2;

				if(arr[i]%2 == 1) {
					flag = 0;
				}

			}

			++count;

		} flag==1 flag 1 {

			for(int i=0; i<N; i++) {

				if(count==0 && arr[i]%2 == 1) {
					flag = 0;
					count= -1;
					break;
				}

				arr[i] = arr[i]/2;

				if(arr[i]%2 == 1) {
					flag = 0;
				}

			}

			++count;

		} for(int i=0; i<N; i++) {

				if(count==0 && arr[i]%2 == 1) {
					flag = 0;
					count= -1;
					break;
				}

				arr[i] = arr[i]/2;

				if(arr[i]%2 == 1) {
					flag = 0;
				}

			} int i=0; int i=0; i 0 i<N i N i++ i++ i {

				if(count==0 && arr[i]%2 == 1) {
					flag = 0;
					count= -1;
					break;
				}

				arr[i] = arr[i]/2;

				if(arr[i]%2 == 1) {
					flag = 0;
				}

			} {

				if(count==0 && arr[i]%2 == 1) {
					flag = 0;
					count= -1;
					break;
				}

				arr[i] = arr[i]/2;

				if(arr[i]%2 == 1) {
					flag = 0;
				}

			} if(count==0 && arr[i]%2 == 1) {
					flag = 0;
					count= -1;
					break;
				} count==0 && arr[i]%2 == 1 count==0 count 0 arr[i]%2 == 1 arr[i]%2 arr[i] arr i 2 1 {
					flag = 0;
					count= -1;
					break;
				} flag = 0 flag 0 count= -1 count -1 1 break; arr[i] = arr[i]/2 arr[i] arr i arr[i]/2 arr[i] arr i 2 if(arr[i]%2 == 1) {
					flag = 0;
				} arr[i]%2 == 1 arr[i]%2 arr[i] arr i 2 1 {
					flag = 0;
				} flag = 0 flag 0 ++count count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main{

	public static void main(String[] args){

		Scanner scan = new Scanner(System.in);

		int N = scan.nextInt();
		scan.nextLine();

		int arr[] = new int[N];
		int flag = 1;
		int count = 0;

		for(int i=0; i<N; i++) {
			arr[i] = scan.nextInt();
		}

		while(flag==1) {

			for(int i=0; i<N; i++) {

				if(count==0 && arr[i]%2 == 1) {
					flag = 0;
					count= -1;
					break;
				}

				arr[i] = arr[i]/2;

				if(arr[i]%2 == 1) {
					flag = 0;
				}

			}

			++count;

		}

		System.out.println(count);

	}
} public class Main{

	public static void main(String[] args){

		Scanner scan = new Scanner(System.in);

		int N = scan.nextInt();
		scan.nextLine();

		int arr[] = new int[N];
		int flag = 1;
		int count = 0;

		for(int i=0; i<N; i++) {
			arr[i] = scan.nextInt();
		}

		while(flag==1) {

			for(int i=0; i<N; i++) {

				if(count==0 && arr[i]%2 == 1) {
					flag = 0;
					count= -1;
					break;
				}

				arr[i] = arr[i]/2;

				if(arr[i]%2 == 1) {
					flag = 0;
				}

			}

			++count;

		}

		System.out.println(count);

	}
} Main
//第 4 問: ABC 087 B - Coinsi (200 点)

import java.util.Scanner;

public class Main{

	public static void main(String[] args){

		Scanner scan = new Scanner(System.in);

		int N = scan.nextInt();
		scan.nextLine();

		int arr[] = new int[N];
		int flag = 1;
		int count = 0;

		for(int i=0; i<N; i++) {
			arr[i] = scan.nextInt();
		}

		while(flag==1) {

			for(int i=0; i<N; i++) {

				if(count==0 && arr[i]%2 == 1) {
					flag = 0;
					count= -1;
					break;
				}

				arr[i] = arr[i]/2;

				if(arr[i]%2 == 1) {
					flag = 0;
				}

			}

			++count;

		}

		System.out.println(count);

	}
}

