#include<bits/stdc++.h>
using namespace std;
using ll=long long;

int main(){
	ll A,B,C;cin>>A>>B>>C;
	ll na,nb,nc;
	ll ret=0;
	for(;;){
		if(A%2||B%2||C%2)break;
		++ret;
		na=B*0.5+C*0.5;
		nb=A*0.5+C*0.5;
		nc=A*0.5+B*0.5;
		A=na;
		B=nb;
		C=nc;
		if(na%2||nb%2||nc%2)break;
		if(na==nb&&nb==nc){ret=-1;break;}
	}
	cout<<ret<<endl;
	return 0;
}
