import java.util.*;
import java.util.Collections;

public class Main {

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

  public static void primeFactorization(int num) {
    int Z = 0;
    for (int i = 2; num > i; i++) {
      while (num % i == 0) {
        System.out.println(i);
        num /= i;
        Z = num;
      }
    }
    System.out.println(Z);
  }

  public static boolean isPrime(int num) {
    if (num < 2)
      return false;
    else if (num == 2)
      return true;
    else if (num % 2 == 0)
      return false;

    for (int i = 3; i < num; i += 2) {
      if (num % i == 0) {
        return false;
      }
    }
    return true;
  }
} import java.util.*; util.* java import java.util.Collections; Collections java.util public class Main {

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

  public static void primeFactorization(int num) {
    int Z = 0;
    for (int i = 2; num > i; i++) {
      while (num % i == 0) {
        System.out.println(i);
        num /= i;
        Z = num;
      }
    }
    System.out.println(Z);
  }

  public static boolean isPrime(int num) {
    if (num < 2)
      return false;
    else if (num == 2)
      return true;
    else if (num % 2 == 0)
      return false;

    for (int i = 3; i < num; i += 2) {
      if (num % i == 0) {
        return false;
      }
    }
    return true;
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int min = Integer.MAX_VALUE;
    int cnt = 0;
    int N = sc.nextInt();
    for (int i = 0; i < N; i++) {
      cnt = 0;
      int A = sc.nextInt();
      while (A % 2 == 0) {
        cnt++;
        A /= 2;
      }
      min = Math.min(min, cnt);
    }
    System.out.println(min);
  } main {
    Scanner sc = new Scanner(System.in);
    int min = Integer.MAX_VALUE;
    int cnt = 0;
    int N = sc.nextInt();
    for (int i = 0; i < N; i++) {
      cnt = 0;
      int A = sc.nextInt();
      while (A % 2 == 0) {
        cnt++;
        A /= 2;
      }
      min = Math.min(min, cnt);
    }
    System.out.println(min);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE int cnt = 0; cnt 0 int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc for (int i = 0; i < N; i++) {
      cnt = 0;
      int A = sc.nextInt();
      while (A % 2 == 0) {
        cnt++;
        A /= 2;
      }
      min = Math.min(min, cnt);
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
      cnt = 0;
      int A = sc.nextInt();
      while (A % 2 == 0) {
        cnt++;
        A /= 2;
      }
      min = Math.min(min, cnt);
    } {
      cnt = 0;
      int A = sc.nextInt();
      while (A % 2 == 0) {
        cnt++;
        A /= 2;
      }
      min = Math.min(min, cnt);
    } cnt = 0 cnt 0 int A = sc.nextInt(); A sc.nextInt() sc.nextInt sc while (A % 2 == 0) {
        cnt++;
        A /= 2;
      } A % 2 == 0 A % 2 A 2 0 {
        cnt++;
        A /= 2;
      } cnt++ cnt A /= 2 A 2 min = Math.min(min, cnt) min Math.min(min, cnt) Math.min Math min cnt System.out.println(min) System.out.println System.out System System.out min String[] args args public static void primeFactorization(int num) {
    int Z = 0;
    for (int i = 2; num > i; i++) {
      while (num % i == 0) {
        System.out.println(i);
        num /= i;
        Z = num;
      }
    }
    System.out.println(Z);
  } primeFactorization {
    int Z = 0;
    for (int i = 2; num > i; i++) {
      while (num % i == 0) {
        System.out.println(i);
        num /= i;
        Z = num;
      }
    }
    System.out.println(Z);
  } int Z = 0; Z 0 for (int i = 2; num > i; i++) {
      while (num % i == 0) {
        System.out.println(i);
        num /= i;
        Z = num;
      }
    } int i = 2; int i = 2; i 2 num > i num i i++ i++ i {
      while (num % i == 0) {
        System.out.println(i);
        num /= i;
        Z = num;
      }
    } {
      while (num % i == 0) {
        System.out.println(i);
        num /= i;
        Z = num;
      }
    } while (num % i == 0) {
        System.out.println(i);
        num /= i;
        Z = num;
      } num % i == 0 num % i num i 0 {
        System.out.println(i);
        num /= i;
        Z = num;
      } System.out.println(i) System.out.println System.out System System.out i num /= i num i Z = num Z num System.out.println(Z) System.out.println System.out System System.out Z int num num public static boolean isPrime(int num) {
    if (num < 2)
      return false;
    else if (num == 2)
      return true;
    else if (num % 2 == 0)
      return false;

    for (int i = 3; i < num; i += 2) {
      if (num % i == 0) {
        return false;
      }
    }
    return true;
  } isPrime {
    if (num < 2)
      return false;
    else if (num == 2)
      return true;
    else if (num % 2 == 0)
      return false;

    for (int i = 3; i < num; i += 2) {
      if (num % i == 0) {
        return false;
      }
    }
    return true;
  } if (num < 2)
      return false;
    else if (num == 2)
      return true;
    else if (num % 2 == 0)
      return false; num < 2 num 2 return false; false if (num == 2)
      return true;
    else if (num % 2 == 0)
      return false; num == 2 num 2 return true; true if (num % 2 == 0)
      return false; num % 2 == 0 num % 2 num 2 0 return false; false for (int i = 3; i < num; i += 2) {
      if (num % i == 0) {
        return false;
      }
    } int i = 3; int i = 3; i 3 i < num i num i += 2 i += 2 i 2 {
      if (num % i == 0) {
        return false;
      }
    } {
      if (num % i == 0) {
        return false;
      }
    } if (num % i == 0) {
        return false;
      } num % i == 0 num % i num i 0 {
        return false;
      } return false; false return true; true int num num public class Main {

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

  public static void primeFactorization(int num) {
    int Z = 0;
    for (int i = 2; num > i; i++) {
      while (num % i == 0) {
        System.out.println(i);
        num /= i;
        Z = num;
      }
    }
    System.out.println(Z);
  }

  public static boolean isPrime(int num) {
    if (num < 2)
      return false;
    else if (num == 2)
      return true;
    else if (num % 2 == 0)
      return false;

    for (int i = 3; i < num; i += 2) {
      if (num % i == 0) {
        return false;
      }
    }
    return true;
  }
} public class Main {

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

  public static void primeFactorization(int num) {
    int Z = 0;
    for (int i = 2; num > i; i++) {
      while (num % i == 0) {
        System.out.println(i);
        num /= i;
        Z = num;
      }
    }
    System.out.println(Z);
  }

  public static boolean isPrime(int num) {
    if (num < 2)
      return false;
    else if (num == 2)
      return true;
    else if (num % 2 == 0)
      return false;

    for (int i = 3; i < num; i += 2) {
      if (num % i == 0) {
        return false;
      }
    }
    return true;
  }
} Main
import java.util.*;
import java.util.Collections;

public class Main {

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

  public static void primeFactorization(int num) {
    int Z = 0;
    for (int i = 2; num > i; i++) {
      while (num % i == 0) {
        System.out.println(i);
        num /= i;
        Z = num;
      }
    }
    System.out.println(Z);
  }

  public static boolean isPrime(int num) {
    if (num < 2)
      return false;
    else if (num == 2)
      return true;
    else if (num % 2 == 0)
      return false;

    for (int i = 3; i < num; i += 2) {
      if (num % i == 0) {
        return false;
      }
    }
    return true;
  }
}
