unittest
{
	assert( [ "4 12 20" ].parse.expand.solve == 3 );
	assert( [ "14 14 14" ].parse.expand.solve == -1 );
	assert( [ "454 414 444" ].parse.expand.solve == 1 );
}



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

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

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto abc = input.front.split.to!( long[] );
	return tuple( abc[ 0 ], abc[ 1 ], abc[ 2 ] );
}

auto solve( long a, long b, long c )
{
	if( a == b && b == c ) return -1;
	
	auto ans = 0L;
	while( a % 2 == 0 && b % 2 == 0 && c % 2 == 0 )
	{
		auto aa = b / 2 + c / 2;
		auto bb = a / 2 + c / 2;
		auto cc = a / 2 + b / 2;
		a = aa;
		b = bb;
		c = cc;
		ans++;
	}
	return ans;
}
