#include<iostream>
using namespace std;
int main()
{
	int a,b,c;
	scanf("%d%d%d",&a,&b,&c);
	int flag=1;
	int cnt=0;
	int h=0;
	if(a%2==1||b%2==1||c%2==1){
		flag=0;
		printf("0\n");
		return 0;
	}
	if(a==b&&b==c){
			flag=0;
		printf("-1\n");
		return 0;
	}
	int A,B,C;
	A=a;B=b;C=c;
	for(;flag!=0;){	
		a=B/2+C/2;
		b=A/2+C/2;
		c=B/2+A/2;
		cnt++;
		A=a;B=b;C=c;
		h=1;
		if(a%2==1||b%2==1||c%2==1){
			break;
		}
	}
	if(h==1)
	printf("%d\n",cnt);
}