There are N positive integers written on a blackboard: A_1, ..., A_N.

Snuke can perform the following operation when all integers on the blackboard are even:

* Replace each integer X on the blackboard by X divided by 2.



Find the maximum possible number of operations that Snuke can perform.

Constraints

* 1 \leq N \leq 200
* 1 \leq A_i \leq 10^9

Input

Input is given from Standard Input in the following format:


N
A_1 A_2 ... A_N


Output

Print the maximum possible number of operations that Snuke can perform.

Examples

Input

3
8 12 40


Output

2


Input

4
5 6 8 10


Output

0


Input

6
382253568 723152896 37802240 379425024 404894720 471526144


Output

8
/*input
3
8 12 40
*/
#include <bits/stdc++.h>
using namespace std;

int main(){
	int n;
	cin >> n;
	int mx = 50000;
	for(int i=0;i<n;++i){
		int x;
		cin >> x;
		int ct = 0;
		while(x % 2 == 0)x/=2, ct++;
		mx = min(mx, ct);
	}
	cout << mx << endl;
	return 0;
}