function Main(s) {
	s = s.split("\n");
	var n = parseInt(s[0]);
	var a = s[1].split(" ").map(a => parseInt(a));
	var b = 0;
	for(var i = 0; i < n; i++){
		b |= a[i];
	}
	
	var ans = 0;
	while((b & 1) === 0){
		ans++;
		b >>>= 1;
	}
	
	console.log(ans);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());