import "dart:io";
import "dart:math";

main(){
  final int N = int.parse(stdin.readLineSync());
  List<int> A = stdin.readLineSync().split(" ").map((x) => int.parse(x)).toList();

  int ans = 0;
  var count = new List.generate(N, (i) => 0);
  for (int i = 0; i < N; i++){
    int tmp = 0;
    while (A[i] % 2 == 0){
      A[i] = A[i] ~/ 2;
      ++tmp;
    }
    count[i] = tmp;
  }
  ans = count.reduce(min);
  print(ans);
}
