unittest
{
	assert( [ "3", "8 12 40" ].parse.expand.solve == 2 );
	assert( [ "4", "5 6 8 10" ].parse.expand.solve == 0 );
	assert( [ "6", "382253568 723152896 37802240 379425024 404894720 471526144" ].parse.expand.solve == 8 );
}



import std.algorithm;
import std.conv;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

void main()
{
	stdin.byLineCopy.parse.expand.solve.writeln;
}

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto n = input.front.strip.to!( long );
	input.popFront;
	auto as = input.front.split.to!( long[] );
	return tuple( as );
}

auto solve( long[] as )
{
	auto r = 0L;
	
	while( as.count!( ( a ) => a % 2 == 1 ) == 0 )
	{
		as.each!( ( ref a ) => a /= 2 );
		r++;
	}
	
	return r;
}
