import java.util.*;
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    sc.nextLine();

    int result = Integer.MAX_VALUE;
    for(int i = 0; i < n; i++) {
      int val = sc.nextInt();
      if(val % 2 > 0) {
        result = 0;
        break;
      }
      
      int times = 0;
      while(val % 2 == 0) {
        times++;
        val /= 2;
      }
      result = (times < result) ? times : result;
    }
    System.out.println(result);
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    sc.nextLine();

    int result = Integer.MAX_VALUE;
    for(int i = 0; i < n; i++) {
      int val = sc.nextInt();
      if(val % 2 > 0) {
        result = 0;
        break;
      }
      
      int times = 0;
      while(val % 2 == 0) {
        times++;
        val /= 2;
      }
      result = (times < result) ? times : result;
    }
    System.out.println(result);
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    sc.nextLine();

    int result = Integer.MAX_VALUE;
    for(int i = 0; i < n; i++) {
      int val = sc.nextInt();
      if(val % 2 > 0) {
        result = 0;
        break;
      }
      
      int times = 0;
      while(val % 2 == 0) {
        times++;
        val /= 2;
      }
      result = (times < result) ? times : result;
    }
    System.out.println(result);
  } main {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    sc.nextLine();

    int result = Integer.MAX_VALUE;
    for(int i = 0; i < n; i++) {
      int val = sc.nextInt();
      if(val % 2 > 0) {
        result = 0;
        break;
      }
      
      int times = 0;
      while(val % 2 == 0) {
        times++;
        val /= 2;
      }
      result = (times < result) ? times : result;
    }
    System.out.println(result);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc sc.nextLine() sc.nextLine sc int result = Integer.MAX_VALUE; result Integer.MAX_VALUE Integer Integer.MAX_VALUE for(int i = 0; i < n; i++) {
      int val = sc.nextInt();
      if(val % 2 > 0) {
        result = 0;
        break;
      }
      
      int times = 0;
      while(val % 2 == 0) {
        times++;
        val /= 2;
      }
      result = (times < result) ? times : result;
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      int val = sc.nextInt();
      if(val % 2 > 0) {
        result = 0;
        break;
      }
      
      int times = 0;
      while(val % 2 == 0) {
        times++;
        val /= 2;
      }
      result = (times < result) ? times : result;
    } {
      int val = sc.nextInt();
      if(val % 2 > 0) {
        result = 0;
        break;
      }
      
      int times = 0;
      while(val % 2 == 0) {
        times++;
        val /= 2;
      }
      result = (times < result) ? times : result;
    } int val = sc.nextInt(); val sc.nextInt() sc.nextInt sc if(val % 2 > 0) {
        result = 0;
        break;
      } val % 2 > 0 val % 2 val 2 0 {
        result = 0;
        break;
      } result = 0 result 0 break; int times = 0; times 0 while(val % 2 == 0) {
        times++;
        val /= 2;
      } val % 2 == 0 val % 2 val 2 0 {
        times++;
        val /= 2;
      } times++ times val /= 2 val 2 result = (times < result) ? times : result result (times < result) ? times : result (times < result) times result times result System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    sc.nextLine();

    int result = Integer.MAX_VALUE;
    for(int i = 0; i < n; i++) {
      int val = sc.nextInt();
      if(val % 2 > 0) {
        result = 0;
        break;
      }
      
      int times = 0;
      while(val % 2 == 0) {
        times++;
        val /= 2;
      }
      result = (times < result) ? times : result;
    }
    System.out.println(result);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    sc.nextLine();

    int result = Integer.MAX_VALUE;
    for(int i = 0; i < n; i++) {
      int val = sc.nextInt();
      if(val % 2 > 0) {
        result = 0;
        break;
      }
      
      int times = 0;
      while(val % 2 == 0) {
        times++;
        val /= 2;
      }
      result = (times < result) ? times : result;
    }
    System.out.println(result);
  }
} Main
import java.util.*;
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    sc.nextLine();

    int result = Integer.MAX_VALUE;
    for(int i = 0; i < n; i++) {
      int val = sc.nextInt();
      if(val % 2 > 0) {
        result = 0;
        break;
      }
      
      int times = 0;
      while(val % 2 == 0) {
        times++;
        val /= 2;
      }
      result = (times < result) ? times : result;
    }
    System.out.println(result);
  }
}