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