#include<iostream>
#include<algorithm>
using namespace std;
const int N=1000000;
int main()
{
	int a,a1,b,b1,c,c1,k,i;
	while(cin>>a>>b>>c){
		k=0;
		for(i=1;i<N;i++){
			if(a%2==0 && b%2==0 &&c%2==0){
				k++;
			}
			else{
				break;
			}
			a1=a/2;b1=b/2;c1=c/2;
			a=b1+c1;b=a1+c1;c=b1+a1;
		}
		if(i<N) printf("%d\n",k);
		else printf("-1\n");
	}
}