#include<cstdio>
#include<iostream>
using namespace std;
int main(){
	int i,sum=0,a,b,c,x,y,z;
	cin>>a>>b>>c;
	bool f=false;
	for(i=0;i<1000;i++){
	if(a%2!=0||b%2!=0||c%2!=0){
	f=true;break;}
		
		x=a;y=b;z=c;
		a=(y+z)/2;
		b=(x+z)/2;
		c=(x+z)/2;
		
	}
	if(f)
	cout<<i;
	else cout<<"-1";
}