import java.io.*;
public class Main{
    public static void main(String[] args) throws IOException{
        Reader r = new Reader();  
        int N = r.i();
        int[] A = r.ii();
        int min = Integer.MAX_VALUE;
        for(int a : A){
            int c = 0;
            while(a%2 == 0){
                a /= 2;
                c++;
            }
            if(c < min)
                min = c;
        }
        println(min);
    }
    static void print(Object o){
        System.out.print(o.toString());
    }
    static void println(Object o){
        System.out.println(o.toString());
    }
    static int Int(String s){
        return Integer.parseInt(s);
    }
    static long Long(String s){
        return Long.parseLong(s);
    }
    static class Reader extends BufferedReader{
        Reader(){
            super(new InputStreamReader(System.in));
        }
        String s() throws IOException{
            return readLine();
        }
        String[] ss() throws IOException{
            return s().split(" ");
        }
        int i() throws IOException{
            return Int(s());
        }
        int[] ii() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            int[] ii = new int[size];
            for(int j = 0; j < size; j++) ii[j] = Int(ss[j]);
            return ii;
        }
        long l() throws IOException{
            return Long(s());
        }
        long[] ll() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            long[] ll = new long[size];
            for(int j = 0; j < size; j++) ll[j] = Long(ss[j]);            
            return ll;
        }
    }
} import java.io.*; io.* java public class Main{
    public static void main(String[] args) throws IOException{
        Reader r = new Reader();  
        int N = r.i();
        int[] A = r.ii();
        int min = Integer.MAX_VALUE;
        for(int a : A){
            int c = 0;
            while(a%2 == 0){
                a /= 2;
                c++;
            }
            if(c < min)
                min = c;
        }
        println(min);
    }
    static void print(Object o){
        System.out.print(o.toString());
    }
    static void println(Object o){
        System.out.println(o.toString());
    }
    static int Int(String s){
        return Integer.parseInt(s);
    }
    static long Long(String s){
        return Long.parseLong(s);
    }
    static class Reader extends BufferedReader{
        Reader(){
            super(new InputStreamReader(System.in));
        }
        String s() throws IOException{
            return readLine();
        }
        String[] ss() throws IOException{
            return s().split(" ");
        }
        int i() throws IOException{
            return Int(s());
        }
        int[] ii() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            int[] ii = new int[size];
            for(int j = 0; j < size; j++) ii[j] = Int(ss[j]);
            return ii;
        }
        long l() throws IOException{
            return Long(s());
        }
        long[] ll() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            long[] ll = new long[size];
            for(int j = 0; j < size; j++) ll[j] = Long(ss[j]);            
            return ll;
        }
    }
} Main public static void main(String[] args) throws IOException{
        Reader r = new Reader();  
        int N = r.i();
        int[] A = r.ii();
        int min = Integer.MAX_VALUE;
        for(int a : A){
            int c = 0;
            while(a%2 == 0){
                a /= 2;
                c++;
            }
            if(c < min)
                min = c;
        }
        println(min);
    } main {
        Reader r = new Reader();  
        int N = r.i();
        int[] A = r.ii();
        int min = Integer.MAX_VALUE;
        for(int a : A){
            int c = 0;
            while(a%2 == 0){
                a /= 2;
                c++;
            }
            if(c < min)
                min = c;
        }
        println(min);
    } Reader r = new Reader(); r new Reader() int N = r.i(); N r.i() r.i r int[] A = r.ii(); A r.ii() r.ii r int min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE for(int a : A){
            int c = 0;
            while(a%2 == 0){
                a /= 2;
                c++;
            }
            if(c < min)
                min = c;
        } int a A {
            int c = 0;
            while(a%2 == 0){
                a /= 2;
                c++;
            }
            if(c < min)
                min = c;
        } {
            int c = 0;
            while(a%2 == 0){
                a /= 2;
                c++;
            }
            if(c < min)
                min = c;
        } int c = 0; c 0 while(a%2 == 0){
                a /= 2;
                c++;
            } a%2 == 0 a%2 a 2 0 {
                a /= 2;
                c++;
            } a /= 2 a 2 c++ c if(c < min)
                min = c; c < min c min min = c min c println(min) println min String[] args args static void print(Object o){
        System.out.print(o.toString());
    } print {
        System.out.print(o.toString());
    } System.out.print(o.toString()) System.out.print System.out System System.out o.toString() o.toString o Object o o static void println(Object o){
        System.out.println(o.toString());
    } println {
        System.out.println(o.toString());
    } System.out.println(o.toString()) System.out.println System.out System System.out o.toString() o.toString o Object o o static int Int(String s){
        return Integer.parseInt(s);
    } Int {
        return Integer.parseInt(s);
    } return Integer.parseInt(s); Integer.parseInt(s) Integer.parseInt Integer s String s s static long Long(String s){
        return Long.parseLong(s);
    } Long {
        return Long.parseLong(s);
    } return Long.parseLong(s); Long.parseLong(s) Long.parseLong Long s String s s static class Reader extends BufferedReader{
        Reader(){
            super(new InputStreamReader(System.in));
        }
        String s() throws IOException{
            return readLine();
        }
        String[] ss() throws IOException{
            return s().split(" ");
        }
        int i() throws IOException{
            return Int(s());
        }
        int[] ii() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            int[] ii = new int[size];
            for(int j = 0; j < size; j++) ii[j] = Int(ss[j]);
            return ii;
        }
        long l() throws IOException{
            return Long(s());
        }
        long[] ll() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            long[] ll = new long[size];
            for(int j = 0; j < size; j++) ll[j] = Long(ss[j]);            
            return ll;
        }
    } Reader Reader(){
            super(new InputStreamReader(System.in));
        } Reader {
            super(new InputStreamReader(System.in));
        } super(new InputStreamReader(System.in)) super new InputStreamReader(System.in) String s() throws IOException{
            return readLine();
        } s {
            return readLine();
        } return readLine(); readLine() readLine String[] ss() throws IOException{
            return s().split(" ");
        } ss {
            return s().split(" ");
        } return s().split(" "); s().split(" ") s().split s() s " " int i() throws IOException{
            return Int(s());
        } i {
            return Int(s());
        } return Int(s()); Int(s()) Int s() s int[] ii() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            int[] ii = new int[size];
            for(int j = 0; j < size; j++) ii[j] = Int(ss[j]);
            return ii;
        } ii {
            String[] ss = ss();
            int size = ss.length;
            int[] ii = new int[size];
            for(int j = 0; j < size; j++) ii[j] = Int(ss[j]);
            return ii;
        } String[] ss = ss(); ss ss() ss int size = ss.length; size ss.length ss ss.length int[] ii = new int[size]; ii new int[size] size for(int j = 0; j < size; j++) ii[j] = Int(ss[j]); int j = 0; int j = 0; j 0 j < size j size j++ j++ j ii[j] = Int(ss[j]); ii[j] = Int(ss[j]) ii[j] ii j Int(ss[j]) Int ss[j] ss j return ii; ii long l() throws IOException{
            return Long(s());
        } l {
            return Long(s());
        } return Long(s()); Long(s()) Long s() s long[] ll() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            long[] ll = new long[size];
            for(int j = 0; j < size; j++) ll[j] = Long(ss[j]);            
            return ll;
        } ll {
            String[] ss = ss();
            int size = ss.length;
            long[] ll = new long[size];
            for(int j = 0; j < size; j++) ll[j] = Long(ss[j]);            
            return ll;
        } String[] ss = ss(); ss ss() ss int size = ss.length; size ss.length ss ss.length long[] ll = new long[size]; ll new long[size] size for(int j = 0; j < size; j++) ll[j] = Long(ss[j]); int j = 0; int j = 0; j 0 j < size j size j++ j++ j ll[j] = Long(ss[j]); ll[j] = Long(ss[j]) ll[j] ll j Long(ss[j]) Long ss[j] ss j return ll; ll BufferedReader public class Main{
    public static void main(String[] args) throws IOException{
        Reader r = new Reader();  
        int N = r.i();
        int[] A = r.ii();
        int min = Integer.MAX_VALUE;
        for(int a : A){
            int c = 0;
            while(a%2 == 0){
                a /= 2;
                c++;
            }
            if(c < min)
                min = c;
        }
        println(min);
    }
    static void print(Object o){
        System.out.print(o.toString());
    }
    static void println(Object o){
        System.out.println(o.toString());
    }
    static int Int(String s){
        return Integer.parseInt(s);
    }
    static long Long(String s){
        return Long.parseLong(s);
    }
    static class Reader extends BufferedReader{
        Reader(){
            super(new InputStreamReader(System.in));
        }
        String s() throws IOException{
            return readLine();
        }
        String[] ss() throws IOException{
            return s().split(" ");
        }
        int i() throws IOException{
            return Int(s());
        }
        int[] ii() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            int[] ii = new int[size];
            for(int j = 0; j < size; j++) ii[j] = Int(ss[j]);
            return ii;
        }
        long l() throws IOException{
            return Long(s());
        }
        long[] ll() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            long[] ll = new long[size];
            for(int j = 0; j < size; j++) ll[j] = Long(ss[j]);            
            return ll;
        }
    }
} public class Main{
    public static void main(String[] args) throws IOException{
        Reader r = new Reader();  
        int N = r.i();
        int[] A = r.ii();
        int min = Integer.MAX_VALUE;
        for(int a : A){
            int c = 0;
            while(a%2 == 0){
                a /= 2;
                c++;
            }
            if(c < min)
                min = c;
        }
        println(min);
    }
    static void print(Object o){
        System.out.print(o.toString());
    }
    static void println(Object o){
        System.out.println(o.toString());
    }
    static int Int(String s){
        return Integer.parseInt(s);
    }
    static long Long(String s){
        return Long.parseLong(s);
    }
    static class Reader extends BufferedReader{
        Reader(){
            super(new InputStreamReader(System.in));
        }
        String s() throws IOException{
            return readLine();
        }
        String[] ss() throws IOException{
            return s().split(" ");
        }
        int i() throws IOException{
            return Int(s());
        }
        int[] ii() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            int[] ii = new int[size];
            for(int j = 0; j < size; j++) ii[j] = Int(ss[j]);
            return ii;
        }
        long l() throws IOException{
            return Long(s());
        }
        long[] ll() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            long[] ll = new long[size];
            for(int j = 0; j < size; j++) ll[j] = Long(ss[j]);            
            return ll;
        }
    }
} Main
import java.io.*;
public class Main{
    public static void main(String[] args) throws IOException{
        Reader r = new Reader();  
        int N = r.i();
        int[] A = r.ii();
        int min = Integer.MAX_VALUE;
        for(int a : A){
            int c = 0;
            while(a%2 == 0){
                a /= 2;
                c++;
            }
            if(c < min)
                min = c;
        }
        println(min);
    }
    static void print(Object o){
        System.out.print(o.toString());
    }
    static void println(Object o){
        System.out.println(o.toString());
    }
    static int Int(String s){
        return Integer.parseInt(s);
    }
    static long Long(String s){
        return Long.parseLong(s);
    }
    static class Reader extends BufferedReader{
        Reader(){
            super(new InputStreamReader(System.in));
        }
        String s() throws IOException{
            return readLine();
        }
        String[] ss() throws IOException{
            return s().split(" ");
        }
        int i() throws IOException{
            return Int(s());
        }
        int[] ii() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            int[] ii = new int[size];
            for(int j = 0; j < size; j++) ii[j] = Int(ss[j]);
            return ii;
        }
        long l() throws IOException{
            return Long(s());
        }
        long[] ll() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            long[] ll = new long[size];
            for(int j = 0; j < size; j++) ll[j] = Long(ss[j]);            
            return ll;
        }
    }
}