import java.util.*;

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

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    
    int ans = Integer.MAX_VALUE;
    for (int i = 0; i < N; i++) {
      int a = sc.nextInt();
      int count = 0;
      while (a % 2 == 0) {
        count++;
        a /= 2;
      }
      ans = Math.min(ans, count);
    }
    
    System.out.println(ans == Integer.MAX_VALUE ? 0 : ans);
  }
}