#include<bits/stdc++.h>
using namespace std;
int main(){
	long long a,b,c,x,y,z;
	cin>>a>>b>>c;
	int ans=0;
	while(1){
		if(a%2||b%2||c%2)break;
		x=(a+b)/2;
		y=(b+c)/2;
		z=(a+c)/2;
		a=x;
		b=y;
		c=z;
		ans++;
		if(ans>2e6){
			ans=-1;
			break;
		}
	}
	cout<<ans<<endl;

	
	return 0;
}
