import java.util.*;

class Main {
    public static void main(String[] args) {
        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 = Integer.MAX_VALUE;
        for (int i = 0; i < N; i++) {
            int cnt = 0;
            while (A[i] % 2 == 0) {
                A[i] /= 2;
                cnt++;
            }
            ans = Math.min(ans, cnt);
        }
        System.out.println(ans);
    }
} import java.util.*; util.* java class Main {
    public static void main(String[] args) {
        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 = Integer.MAX_VALUE;
        for (int i = 0; i < N; i++) {
            int cnt = 0;
            while (A[i] % 2 == 0) {
                A[i] /= 2;
                cnt++;
            }
            ans = Math.min(ans, cnt);
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        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 = Integer.MAX_VALUE;
        for (int i = 0; i < N; i++) {
            int cnt = 0;
            while (A[i] % 2 == 0) {
                A[i] /= 2;
                cnt++;
            }
            ans = Math.min(ans, cnt);
        }
        System.out.println(ans);
    } main {
        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 = Integer.MAX_VALUE;
        for (int i = 0; i < N; i++) {
            int cnt = 0;
            while (A[i] % 2 == 0) {
                A[i] /= 2;
                cnt++;
            }
            ans = Math.min(ans, cnt);
        }
        System.out.println(ans);
    } 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] = sc.nextInt() A[i] A i sc.nextInt() sc.nextInt sc int ans = Integer.MAX_VALUE; ans Integer.MAX_VALUE Integer Integer.MAX_VALUE for (int i = 0; i < N; i++) {
            int cnt = 0;
            while (A[i] % 2 == 0) {
                A[i] /= 2;
                cnt++;
            }
            ans = Math.min(ans, cnt);
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            int cnt = 0;
            while (A[i] % 2 == 0) {
                A[i] /= 2;
                cnt++;
            }
            ans = Math.min(ans, cnt);
        } {
            int cnt = 0;
            while (A[i] % 2 == 0) {
                A[i] /= 2;
                cnt++;
            }
            ans = Math.min(ans, cnt);
        } int cnt = 0; cnt 0 while (A[i] % 2 == 0) {
                A[i] /= 2;
                cnt++;
            } A[i] % 2 == 0 A[i] % 2 A[i] A i 2 0 {
                A[i] /= 2;
                cnt++;
            } A[i] /= 2 A[i] A i 2 cnt++ cnt ans = Math.min(ans, cnt) ans Math.min(ans, cnt) Math.min Math ans cnt System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.*;

class Main {
    public static void main(String[] args) {
        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 = Integer.MAX_VALUE;
        for (int i = 0; i < N; i++) {
            int cnt = 0;
            while (A[i] % 2 == 0) {
                A[i] /= 2;
                cnt++;
            }
            ans = Math.min(ans, cnt);
        }
        System.out.println(ans);
    }
}