import java.util.*;

public class Main {

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

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

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

} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int ans=Integer.MAX_VALUE;
        int tmp;
        int count;
        int n=sc.nextInt();
        for(int i=0;i<n;i++){
            tmp=sc.nextInt();
            count=0;
            while(tmp%2==0){
                tmp/=2;
                count++;
            }
            ans=Math.min(ans,count);
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        int ans=Integer.MAX_VALUE;
        int tmp;
        int count;
        int n=sc.nextInt();
        for(int i=0;i<n;i++){
            tmp=sc.nextInt();
            count=0;
            while(tmp%2==0){
                tmp/=2;
                count++;
            }
            ans=Math.min(ans,count);
        }
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int ans=Integer.MAX_VALUE; ans Integer.MAX_VALUE Integer Integer.MAX_VALUE int tmp; tmp int count; count int n=sc.nextInt(); n sc.nextInt() sc.nextInt sc for(int i=0;i<n;i++){
            tmp=sc.nextInt();
            count=0;
            while(tmp%2==0){
                tmp/=2;
                count++;
            }
            ans=Math.min(ans,count);
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            tmp=sc.nextInt();
            count=0;
            while(tmp%2==0){
                tmp/=2;
                count++;
            }
            ans=Math.min(ans,count);
        } {
            tmp=sc.nextInt();
            count=0;
            while(tmp%2==0){
                tmp/=2;
                count++;
            }
            ans=Math.min(ans,count);
        } tmp=sc.nextInt() tmp sc.nextInt() sc.nextInt sc count=0 count 0 while(tmp%2==0){
                tmp/=2;
                count++;
            } tmp%2==0 tmp%2 tmp 2 0 {
                tmp/=2;
                count++;
            } tmp/=2 tmp 2 count++ count ans=Math.min(ans,count) ans Math.min(ans,count) Math.min Math ans count 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 ans=Integer.MAX_VALUE;
        int tmp;
        int count;
        int n=sc.nextInt();
        for(int i=0;i<n;i++){
            tmp=sc.nextInt();
            count=0;
            while(tmp%2==0){
                tmp/=2;
                count++;
            }
            ans=Math.min(ans,count);
        }
        System.out.println(ans);
    }

} public class Main {

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

} Main
import java.util.*;

public class Main {

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

}