import java.util.*;

public class Main{
  public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    int N = Integer.parseInt(sc.nextLine());
    int min = 1000000;
    for(int i = 0; i < N; i++){
      int n = Integer.parseInt(sc.next());
      int count = 0;
      while(n%2 == 0){
        n /= 2;
        count++;
      }
      min = min > count ? count : min;
    }
    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.nextLine());
    int min = 1000000;
    for(int i = 0; i < N; i++){
      int n = Integer.parseInt(sc.next());
      int count = 0;
      while(n%2 == 0){
        n /= 2;
        count++;
      }
      min = min > count ? count : min;
    }
    System.out.println(min);
  }
} Main public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    int N = Integer.parseInt(sc.nextLine());
    int min = 1000000;
    for(int i = 0; i < N; i++){
      int n = Integer.parseInt(sc.next());
      int count = 0;
      while(n%2 == 0){
        n /= 2;
        count++;
      }
      min = min > count ? count : min;
    }
    System.out.println(min);
  } main {
    Scanner sc = new Scanner(System.in);
    int N = Integer.parseInt(sc.nextLine());
    int min = 1000000;
    for(int i = 0; i < N; i++){
      int n = Integer.parseInt(sc.next());
      int count = 0;
      while(n%2 == 0){
        n /= 2;
        count++;
      }
      min = min > count ? count : min;
    }
    System.out.println(min);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = Integer.parseInt(sc.nextLine()); N Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc int min = 1000000; min 1000000 for(int i = 0; i < N; i++){
      int n = Integer.parseInt(sc.next());
      int count = 0;
      while(n%2 == 0){
        n /= 2;
        count++;
      }
      min = min > count ? count : min;
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
      int n = Integer.parseInt(sc.next());
      int count = 0;
      while(n%2 == 0){
        n /= 2;
        count++;
      }
      min = min > count ? count : min;
    } {
      int n = Integer.parseInt(sc.next());
      int count = 0;
      while(n%2 == 0){
        n /= 2;
        count++;
      }
      min = min > count ? count : min;
    } int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int count = 0; count 0 while(n%2 == 0){
        n /= 2;
        count++;
      } n%2 == 0 n%2 n 2 0 {
        n /= 2;
        count++;
      } n /= 2 n 2 count++ count min = min > count ? count : min min min > count ? count : min min > count min count count min 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.nextLine());
    int min = 1000000;
    for(int i = 0; i < N; i++){
      int n = Integer.parseInt(sc.next());
      int count = 0;
      while(n%2 == 0){
        n /= 2;
        count++;
      }
      min = min > count ? count : min;
    }
    System.out.println(min);
  }
} public class Main{
  public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    int N = Integer.parseInt(sc.nextLine());
    int min = 1000000;
    for(int i = 0; i < N; i++){
      int n = Integer.parseInt(sc.next());
      int count = 0;
      while(n%2 == 0){
        n /= 2;
        count++;
      }
      min = min > count ? count : min;
    }
    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.nextLine());
    int min = 1000000;
    for(int i = 0; i < N; i++){
      int n = Integer.parseInt(sc.next());
      int count = 0;
      while(n%2 == 0){
        n /= 2;
        count++;
      }
      min = min > count ? count : min;
    }
    System.out.println(min);
  }
}