
import java.io.IOException;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

		int result = Integer.MAX_VALUE;
		for(int i = 0; i < n; i++){
			int a = sc.nextInt();

			int count = 0;
			while(a % 2 == 0){
				a /= 2;
				count++;
			}

			result = Math.min(result, count);
		}

		System.out.println(result);
	}
} import java.io.IOException; IOException java.io import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

		int result = Integer.MAX_VALUE;
		for(int i = 0; i < n; i++){
			int a = sc.nextInt();

			int count = 0;
			while(a % 2 == 0){
				a /= 2;
				count++;
			}

			result = Math.min(result, count);
		}

		System.out.println(result);
	}
} Main public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

		int result = Integer.MAX_VALUE;
		for(int i = 0; i < n; i++){
			int a = sc.nextInt();

			int count = 0;
			while(a % 2 == 0){
				a /= 2;
				count++;
			}

			result = Math.min(result, count);
		}

		System.out.println(result);
	} main {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

		int result = Integer.MAX_VALUE;
		for(int i = 0; i < n; i++){
			int a = sc.nextInt();

			int count = 0;
			while(a % 2 == 0){
				a /= 2;
				count++;
			}

			result = Math.min(result, count);
		}

		System.out.println(result);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int result = Integer.MAX_VALUE; result Integer.MAX_VALUE Integer Integer.MAX_VALUE for(int i = 0; i < n; i++){
			int a = sc.nextInt();

			int count = 0;
			while(a % 2 == 0){
				a /= 2;
				count++;
			}

			result = Math.min(result, count);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			int a = sc.nextInt();

			int count = 0;
			while(a % 2 == 0){
				a /= 2;
				count++;
			}

			result = Math.min(result, count);
		} {
			int a = sc.nextInt();

			int count = 0;
			while(a % 2 == 0){
				a /= 2;
				count++;
			}

			result = Math.min(result, count);
		} int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int count = 0; count 0 while(a % 2 == 0){
				a /= 2;
				count++;
			} a % 2 == 0 a % 2 a 2 0 {
				a /= 2;
				count++;
			} a /= 2 a 2 count++ count result = Math.min(result, count) result Math.min(result, count) Math.min Math result count System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {

	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

		int result = Integer.MAX_VALUE;
		for(int i = 0; i < n; i++){
			int a = sc.nextInt();

			int count = 0;
			while(a % 2 == 0){
				a /= 2;
				count++;
			}

			result = Math.min(result, count);
		}

		System.out.println(result);
	}
} public class Main {

	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

		int result = Integer.MAX_VALUE;
		for(int i = 0; i < n; i++){
			int a = sc.nextInt();

			int count = 0;
			while(a % 2 == 0){
				a /= 2;
				count++;
			}

			result = Math.min(result, count);
		}

		System.out.println(result);
	}
} Main

import java.io.IOException;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

		int result = Integer.MAX_VALUE;
		for(int i = 0; i < n; i++){
			int a = sc.nextInt();

			int count = 0;
			while(a % 2 == 0){
				a /= 2;
				count++;
			}

			result = Math.min(result, count);
		}

		System.out.println(result);
	}
}
