import java.lang.reflect.Array;
import java.util.*;

public class Main {

    public static void main(String[] args) {
	// write your code here
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int a[] = new int[n];
        for(int i = 0; i < n; i++) a[i] = sc.nextInt();

        int ans = 0;
        Boolean chk = true;
        Arrays.sort(a);
        int min = a[0];
        while (min != 0 && chk) {
            for(int i = 0; i < n; i++){
                if(a[i] % 2 == 0)
                    a[i] /= 2;
                else
                    chk = false;
            }
            ans++;
        }

        System.out.println(ans-1);
    }
} import java.lang.reflect.Array; Array java.lang.reflect import java.util.*; util.* java public class Main {

    public static void main(String[] args) {
	// write your code here
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int a[] = new int[n];
        for(int i = 0; i < n; i++) a[i] = sc.nextInt();

        int ans = 0;
        Boolean chk = true;
        Arrays.sort(a);
        int min = a[0];
        while (min != 0 && chk) {
            for(int i = 0; i < n; i++){
                if(a[i] % 2 == 0)
                    a[i] /= 2;
                else
                    chk = false;
            }
            ans++;
        }

        System.out.println(ans-1);
    }
} Main public static void main(String[] args) {
	// write your code here
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int a[] = new int[n];
        for(int i = 0; i < n; i++) a[i] = sc.nextInt();

        int ans = 0;
        Boolean chk = true;
        Arrays.sort(a);
        int min = a[0];
        while (min != 0 && chk) {
            for(int i = 0; i < n; i++){
                if(a[i] % 2 == 0)
                    a[i] /= 2;
                else
                    chk = false;
            }
            ans++;
        }

        System.out.println(ans-1);
    } main {
	// write your code here
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int a[] = new int[n];
        for(int i = 0; i < n; i++) a[i] = sc.nextInt();

        int ans = 0;
        Boolean chk = true;
        Arrays.sort(a);
        int min = a[0];
        while (min != 0 && chk) {
            for(int i = 0; i < n; i++){
                if(a[i] % 2 == 0)
                    a[i] /= 2;
                else
                    chk = false;
            }
            ans++;
        }

        System.out.println(ans-1);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int a[] = new int[n]; a new int[n] n for(int i = 0; i < n; i++) a[i] = sc.nextInt(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i a[i] = sc.nextInt(); a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc int ans = 0; ans 0 Boolean chk = true; chk true Arrays.sort(a) Arrays.sort Arrays a int min = a[0]; min a[0] a 0 while (min != 0 && chk) {
            for(int i = 0; i < n; i++){
                if(a[i] % 2 == 0)
                    a[i] /= 2;
                else
                    chk = false;
            }
            ans++;
        } min != 0 && chk min != 0 min 0 chk {
            for(int i = 0; i < n; i++){
                if(a[i] % 2 == 0)
                    a[i] /= 2;
                else
                    chk = false;
            }
            ans++;
        } for(int i = 0; i < n; i++){
                if(a[i] % 2 == 0)
                    a[i] /= 2;
                else
                    chk = false;
            } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
                if(a[i] % 2 == 0)
                    a[i] /= 2;
                else
                    chk = false;
            } {
                if(a[i] % 2 == 0)
                    a[i] /= 2;
                else
                    chk = false;
            } if(a[i] % 2 == 0)
                    a[i] /= 2;
                else
                    chk = false; a[i] % 2 == 0 a[i] % 2 a[i] a i 2 0 a[i] /= 2 a[i] a i 2 chk = false chk false ans++ ans System.out.println(ans-1) System.out.println System.out System System.out ans-1 ans 1 String[] args args public class Main {

    public static void main(String[] args) {
	// write your code here
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int a[] = new int[n];
        for(int i = 0; i < n; i++) a[i] = sc.nextInt();

        int ans = 0;
        Boolean chk = true;
        Arrays.sort(a);
        int min = a[0];
        while (min != 0 && chk) {
            for(int i = 0; i < n; i++){
                if(a[i] % 2 == 0)
                    a[i] /= 2;
                else
                    chk = false;
            }
            ans++;
        }

        System.out.println(ans-1);
    }
} public class Main {

    public static void main(String[] args) {
	// write your code here
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int a[] = new int[n];
        for(int i = 0; i < n; i++) a[i] = sc.nextInt();

        int ans = 0;
        Boolean chk = true;
        Arrays.sort(a);
        int min = a[0];
        while (min != 0 && chk) {
            for(int i = 0; i < n; i++){
                if(a[i] % 2 == 0)
                    a[i] /= 2;
                else
                    chk = false;
            }
            ans++;
        }

        System.out.println(ans-1);
    }
} Main
import java.lang.reflect.Array;
import java.util.*;

public class Main {

    public static void main(String[] args) {
	// write your code here
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int a[] = new int[n];
        for(int i = 0; i < n; i++) a[i] = sc.nextInt();

        int ans = 0;
        Boolean chk = true;
        Arrays.sort(a);
        int min = a[0];
        while (min != 0 && chk) {
            for(int i = 0; i < n; i++){
                if(a[i] % 2 == 0)
                    a[i] /= 2;
                else
                    chk = false;
            }
            ans++;
        }

        System.out.println(ans-1);
    }
}
