import java.util.*;
class Main {
    public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int N = Integer.parseInt(sc.next());
	int a = 0;
	int min = Integer.MAX_VALUE;
	for(int i = 0; i<N; i++) {
	    a = Integer.parseInt(sc.next());
	    int cnt = 0;
	    while(a % 2 == 0) {
		if(cnt>=min) break;
		cnt++;
		a /= 2;
	    }
	    min = Math.min(min,cnt);
	}
	System.out.println(min);



    }
} import java.util.*; util.* java class Main {
    public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int N = Integer.parseInt(sc.next());
	int a = 0;
	int min = Integer.MAX_VALUE;
	for(int i = 0; i<N; i++) {
	    a = Integer.parseInt(sc.next());
	    int cnt = 0;
	    while(a % 2 == 0) {
		if(cnt>=min) break;
		cnt++;
		a /= 2;
	    }
	    min = Math.min(min,cnt);
	}
	System.out.println(min);



    }
} Main public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int N = Integer.parseInt(sc.next());
	int a = 0;
	int min = Integer.MAX_VALUE;
	for(int i = 0; i<N; i++) {
	    a = Integer.parseInt(sc.next());
	    int cnt = 0;
	    while(a % 2 == 0) {
		if(cnt>=min) break;
		cnt++;
		a /= 2;
	    }
	    min = Math.min(min,cnt);
	}
	System.out.println(min);



    } main {
	Scanner sc = new Scanner(System.in);
	int N = Integer.parseInt(sc.next());
	int a = 0;
	int min = Integer.MAX_VALUE;
	for(int i = 0; i<N; i++) {
	    a = Integer.parseInt(sc.next());
	    int cnt = 0;
	    while(a % 2 == 0) {
		if(cnt>=min) break;
		cnt++;
		a /= 2;
	    }
	    min = Math.min(min,cnt);
	}
	System.out.println(min);



    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = Integer.parseInt(sc.next()); N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int a = 0; a 0 int min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE for(int i = 0; i<N; i++) {
	    a = Integer.parseInt(sc.next());
	    int cnt = 0;
	    while(a % 2 == 0) {
		if(cnt>=min) break;
		cnt++;
		a /= 2;
	    }
	    min = Math.min(min,cnt);
	} int i = 0; int i = 0; i 0 i<N i N i++ i++ i {
	    a = Integer.parseInt(sc.next());
	    int cnt = 0;
	    while(a % 2 == 0) {
		if(cnt>=min) break;
		cnt++;
		a /= 2;
	    }
	    min = Math.min(min,cnt);
	} {
	    a = Integer.parseInt(sc.next());
	    int cnt = 0;
	    while(a % 2 == 0) {
		if(cnt>=min) break;
		cnt++;
		a /= 2;
	    }
	    min = Math.min(min,cnt);
	} a = Integer.parseInt(sc.next()) a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int cnt = 0; cnt 0 while(a % 2 == 0) {
		if(cnt>=min) break;
		cnt++;
		a /= 2;
	    } a % 2 == 0 a % 2 a 2 0 {
		if(cnt>=min) break;
		cnt++;
		a /= 2;
	    } if(cnt>=min) break; cnt>=min cnt min break; cnt++ cnt a /= 2 a 2 min = Math.min(min,cnt) min Math.min(min,cnt) Math.min Math min cnt System.out.println(min) System.out.println System.out System System.out min String[] args args
import java.util.*;
class Main {
    public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int N = Integer.parseInt(sc.next());
	int a = 0;
	int min = Integer.MAX_VALUE;
	for(int i = 0; i<N; i++) {
	    a = Integer.parseInt(sc.next());
	    int cnt = 0;
	    while(a % 2 == 0) {
		if(cnt>=min) break;
		cnt++;
		a /= 2;
	    }
	    min = Math.min(min,cnt);
	}
	System.out.println(min);



    }
}