#include<iostream>
using namespace std;
const int M=100000;
int main()
{
	int a,b,c,a1,b1,c1,k,i;
	while(cin>>a>>b>>c)
	{
		k=0;
		for(i=1;i<M;i++)
		{
			if(a%2==0&&b%2==0&&c%2==0) k++;
			else break;
			a1=a/2;b1=b/2;c1=c/2;
			a=b1+c1;b=a1+c1;c=a1+b1;
		}
		if(i<M) cout<<k;
		else cout<<-1;
	}
}