Question
Max Halving Operations

In a math challenge, Mia is presented with N integers written on a board. She can perform a special operation only if all the integers are even. The operation allows her to pick any integer, say x, and replace it with x/2. Mia wants to see how many times she can perform this operation before at least one of the numbers becomes odd. What’s the maximum number of operations Mia can carry out?

Input
The first line of the input contains a single integer N.
The second line of the input contains N space-separated integers.

Constraints:
1 ≤ N ≤ 105
1 ≤ Ai ≤ 109
Output
Find the maximum number of operations you can perform.
Example
Sample Input
3
8 12 40
Sample Output
5

Online