import java.util.*;
 
public class Main {
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int n = Integer.parseInt(sc.next());
    	int[] a = new int[n];
    	int min = Integer.MAX_VALUE;
    	for(int i=0; i<n; i++) {
    	    a[i] = Integer.parseInt(sc.next());
    	    int count = 0;
    	    while(a[i] % 2 == 0) {
    	        a[i] /= 2;
    	        count++;
    	    }
    	    if(min > count) min = count;
    	}
    	System.out.println(min);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int n = Integer.parseInt(sc.next());
    	int[] a = new int[n];
    	int min = Integer.MAX_VALUE;
    	for(int i=0; i<n; i++) {
    	    a[i] = Integer.parseInt(sc.next());
    	    int count = 0;
    	    while(a[i] % 2 == 0) {
    	        a[i] /= 2;
    	        count++;
    	    }
    	    if(min > count) min = count;
    	}
    	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 = new int[n];
    	int min = Integer.MAX_VALUE;
    	for(int i=0; i<n; i++) {
    	    a[i] = Integer.parseInt(sc.next());
    	    int count = 0;
    	    while(a[i] % 2 == 0) {
    	        a[i] /= 2;
    	        count++;
    	    }
    	    if(min > count) min = count;
    	}
    	System.out.println(min);
    } main {
    	Scanner sc = new Scanner(System.in);
    	int n = Integer.parseInt(sc.next());
    	int[] a = new int[n];
    	int min = Integer.MAX_VALUE;
    	for(int i=0; i<n; i++) {
    	    a[i] = Integer.parseInt(sc.next());
    	    int count = 0;
    	    while(a[i] % 2 == 0) {
    	        a[i] /= 2;
    	        count++;
    	    }
    	    if(min > count) min = count;
    	}
    	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 = new int[n]; a new int[n] n int min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE for(int i=0; i<n; i++) {
    	    a[i] = Integer.parseInt(sc.next());
    	    int count = 0;
    	    while(a[i] % 2 == 0) {
    	        a[i] /= 2;
    	        count++;
    	    }
    	    if(min > count) min = count;
    	} int i=0; int i=0; i 0 i<n i n i++ i++ i {
    	    a[i] = Integer.parseInt(sc.next());
    	    int count = 0;
    	    while(a[i] % 2 == 0) {
    	        a[i] /= 2;
    	        count++;
    	    }
    	    if(min > count) min = count;
    	} {
    	    a[i] = Integer.parseInt(sc.next());
    	    int count = 0;
    	    while(a[i] % 2 == 0) {
    	        a[i] /= 2;
    	        count++;
    	    }
    	    if(min > count) min = count;
    	} a[i] = Integer.parseInt(sc.next()) a[i] a i Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int count = 0; count 0 while(a[i] % 2 == 0) {
    	        a[i] /= 2;
    	        count++;
    	    } a[i] % 2 == 0 a[i] % 2 a[i] a i 2 0 {
    	        a[i] /= 2;
    	        count++;
    	    } a[i] /= 2 a[i] a i 2 count++ count if(min > count) min = count; min > count min count min = count min count System.out.println(min) System.out.println System.out System System.out min String[] args args public class Main {
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int n = Integer.parseInt(sc.next());
    	int[] a = new int[n];
    	int min = Integer.MAX_VALUE;
    	for(int i=0; i<n; i++) {
    	    a[i] = Integer.parseInt(sc.next());
    	    int count = 0;
    	    while(a[i] % 2 == 0) {
    	        a[i] /= 2;
    	        count++;
    	    }
    	    if(min > count) min = count;
    	}
    	System.out.println(min);
    }
} public class Main {
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int n = Integer.parseInt(sc.next());
    	int[] a = new int[n];
    	int min = Integer.MAX_VALUE;
    	for(int i=0; i<n; i++) {
    	    a[i] = Integer.parseInt(sc.next());
    	    int count = 0;
    	    while(a[i] % 2 == 0) {
    	        a[i] /= 2;
    	        count++;
    	    }
    	    if(min > count) min = count;
    	}
    	System.out.println(min);
    }
} Main
import java.util.*;
 
public class Main {
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int n = Integer.parseInt(sc.next());
    	int[] a = new int[n];
    	int min = Integer.MAX_VALUE;
    	for(int i=0; i<n; i++) {
    	    a[i] = Integer.parseInt(sc.next());
    	    int count = 0;
    	    while(a[i] % 2 == 0) {
    	        a[i] /= 2;
    	        count++;
    	    }
    	    if(min > count) min = count;
    	}
    	System.out.println(min);
    }
}