import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    int min = 0;
    for (int i = 0; i < n; i++) {
      int a = scan.nextInt();
      int count = findMin(a, 0);
      if (i == 0 || count < min) {
        min = count;
      }
    }
    System.out.println(min);
  }
  
  private static int findMin(int n, int count) {
    if (n % 2 != 0) {
      return count;
    }
    return findMin(n / 2, ++count);
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    int min = 0;
    for (int i = 0; i < n; i++) {
      int a = scan.nextInt();
      int count = findMin(a, 0);
      if (i == 0 || count < min) {
        min = count;
      }
    }
    System.out.println(min);
  }
  
  private static int findMin(int n, int count) {
    if (n % 2 != 0) {
      return count;
    }
    return findMin(n / 2, ++count);
  }
} Main public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    int min = 0;
    for (int i = 0; i < n; i++) {
      int a = scan.nextInt();
      int count = findMin(a, 0);
      if (i == 0 || count < min) {
        min = count;
      }
    }
    System.out.println(min);
  } main {
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    int min = 0;
    for (int i = 0; i < n; i++) {
      int a = scan.nextInt();
      int count = findMin(a, 0);
      if (i == 0 || count < min) {
        min = count;
      }
    }
    System.out.println(min);
  } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int min = 0; min 0 for (int i = 0; i < n; i++) {
      int a = scan.nextInt();
      int count = findMin(a, 0);
      if (i == 0 || count < min) {
        min = count;
      }
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      int a = scan.nextInt();
      int count = findMin(a, 0);
      if (i == 0 || count < min) {
        min = count;
      }
    } {
      int a = scan.nextInt();
      int count = findMin(a, 0);
      if (i == 0 || count < min) {
        min = count;
      }
    } int a = scan.nextInt(); a scan.nextInt() scan.nextInt scan int count = findMin(a, 0); count findMin(a, 0) findMin a 0 if (i == 0 || count < min) {
        min = count;
      } i == 0 || count < min i == 0 i 0 count < min count min {
        min = count;
      } min = count min count System.out.println(min) System.out.println System.out System System.out min String[] args args private static int findMin(int n, int count) {
    if (n % 2 != 0) {
      return count;
    }
    return findMin(n / 2, ++count);
  } findMin {
    if (n % 2 != 0) {
      return count;
    }
    return findMin(n / 2, ++count);
  } if (n % 2 != 0) {
      return count;
    } n % 2 != 0 n % 2 n 2 0 {
      return count;
    } return count; count return findMin(n / 2, ++count); findMin(n / 2, ++count) findMin n / 2 n 2 ++count count int n n int count count public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    int min = 0;
    for (int i = 0; i < n; i++) {
      int a = scan.nextInt();
      int count = findMin(a, 0);
      if (i == 0 || count < min) {
        min = count;
      }
    }
    System.out.println(min);
  }
  
  private static int findMin(int n, int count) {
    if (n % 2 != 0) {
      return count;
    }
    return findMin(n / 2, ++count);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    int min = 0;
    for (int i = 0; i < n; i++) {
      int a = scan.nextInt();
      int count = findMin(a, 0);
      if (i == 0 || count < min) {
        min = count;
      }
    }
    System.out.println(min);
  }
  
  private static int findMin(int n, int count) {
    if (n % 2 != 0) {
      return count;
    }
    return findMin(n / 2, ++count);
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    int min = 0;
    for (int i = 0; i < n; i++) {
      int a = scan.nextInt();
      int count = findMin(a, 0);
      if (i == 0 || count < min) {
        min = count;
      }
    }
    System.out.println(min);
  }
  
  private static int findMin(int n, int count) {
    if (n % 2 != 0) {
      return count;
    }
    return findMin(n / 2, ++count);
  }
}