import java.util.*;
public class Main{
        public static void main(String[] args){
                Scanner sc = new Scanner(System.in);
                int n = sc.nextInt();
                int[] a = new int[n];
                int yono = 10000000;
                for(int i = 0 ; i < n ; i++){
                        a[i] = sc.nextInt();
                        int pct = 0;
                        while(a[i] % 2 == 0){
                                pct++;
                                a[i] /= 2;
                        }
                        yono = Math.min(yono , pct);
                }
                System.out.println(yono);
        }
}
//鶏になれ import java.util.*; util.* java public class Main{
        public static void main(String[] args){
                Scanner sc = new Scanner(System.in);
                int n = sc.nextInt();
                int[] a = new int[n];
                int yono = 10000000;
                for(int i = 0 ; i < n ; i++){
                        a[i] = sc.nextInt();
                        int pct = 0;
                        while(a[i] % 2 == 0){
                                pct++;
                                a[i] /= 2;
                        }
                        yono = Math.min(yono , pct);
                }
                System.out.println(yono);
        }
} Main public static void main(String[] args){
                Scanner sc = new Scanner(System.in);
                int n = sc.nextInt();
                int[] a = new int[n];
                int yono = 10000000;
                for(int i = 0 ; i < n ; i++){
                        a[i] = sc.nextInt();
                        int pct = 0;
                        while(a[i] % 2 == 0){
                                pct++;
                                a[i] /= 2;
                        }
                        yono = Math.min(yono , pct);
                }
                System.out.println(yono);
        } main {
                Scanner sc = new Scanner(System.in);
                int n = sc.nextInt();
                int[] a = new int[n];
                int yono = 10000000;
                for(int i = 0 ; i < n ; i++){
                        a[i] = sc.nextInt();
                        int pct = 0;
                        while(a[i] % 2 == 0){
                                pct++;
                                a[i] /= 2;
                        }
                        yono = Math.min(yono , pct);
                }
                System.out.println(yono);
        } 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 int yono = 10000000; yono 10000000 for(int i = 0 ; i < n ; i++){
                        a[i] = sc.nextInt();
                        int pct = 0;
                        while(a[i] % 2 == 0){
                                pct++;
                                a[i] /= 2;
                        }
                        yono = Math.min(yono , pct);
                } int i = 0 ; int i = 0 ; i 0 i < n i n i++ i++ i {
                        a[i] = sc.nextInt();
                        int pct = 0;
                        while(a[i] % 2 == 0){
                                pct++;
                                a[i] /= 2;
                        }
                        yono = Math.min(yono , pct);
                } {
                        a[i] = sc.nextInt();
                        int pct = 0;
                        while(a[i] % 2 == 0){
                                pct++;
                                a[i] /= 2;
                        }
                        yono = Math.min(yono , pct);
                } a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc int pct = 0; pct 0 while(a[i] % 2 == 0){
                                pct++;
                                a[i] /= 2;
                        } a[i] % 2 == 0 a[i] % 2 a[i] a i 2 0 {
                                pct++;
                                a[i] /= 2;
                        } pct++ pct a[i] /= 2 a[i] a i 2 yono = Math.min(yono , pct) yono Math.min(yono , pct) Math.min Math yono pct System.out.println(yono) System.out.println System.out System System.out yono String[] args args public class Main{
        public static void main(String[] args){
                Scanner sc = new Scanner(System.in);
                int n = sc.nextInt();
                int[] a = new int[n];
                int yono = 10000000;
                for(int i = 0 ; i < n ; i++){
                        a[i] = sc.nextInt();
                        int pct = 0;
                        while(a[i] % 2 == 0){
                                pct++;
                                a[i] /= 2;
                        }
                        yono = Math.min(yono , pct);
                }
                System.out.println(yono);
        }
} public class Main{
        public static void main(String[] args){
                Scanner sc = new Scanner(System.in);
                int n = sc.nextInt();
                int[] a = new int[n];
                int yono = 10000000;
                for(int i = 0 ; i < n ; i++){
                        a[i] = sc.nextInt();
                        int pct = 0;
                        while(a[i] % 2 == 0){
                                pct++;
                                a[i] /= 2;
                        }
                        yono = Math.min(yono , pct);
                }
                System.out.println(yono);
        }
} Main
import java.util.*;
public class Main{
        public static void main(String[] args){
                Scanner sc = new Scanner(System.in);
                int n = sc.nextInt();
                int[] a = new int[n];
                int yono = 10000000;
                for(int i = 0 ; i < n ; i++){
                        a[i] = sc.nextInt();
                        int pct = 0;
                        while(a[i] % 2 == 0){
                                pct++;
                                a[i] /= 2;
                        }
                        yono = Math.min(yono , pct);
                }
                System.out.println(yono);
        }
}
//鶏になれ