#include<iostream>
#include<algorithm>
using namespace std;
int main(){
	int a,b,c;
	cin>>a>>b>>c;
	int cnt=0,sum=a+b+c;
	while(cnt<1000){
		if(a%2==1||b%2==1||c%2==1)break;
		a=(sum-a)/2;
		b=(sum-b)/2;
		c=(sum-c)/2;
		cnt++;
	}
	if(cnt>990)cnt=-1;
	cout<<cnt<<endl;
	return 0;
}
