#include<bits/stdc++.h>
using namespace std;
int a,b,c;
int main(){
	cin>>a>>b>>c;
	int cnt=0;
	while (cnt<=1000000&&a%2==0&&b%2==0&&c%2==0){
		int aa=a,bb=b,cc=c;
		a=bb/2+cc/2;
		b=aa/2+cc/2;
		c=aa/2+bb/2;
		cnt++;
	}
	if (cnt<=1000000)printf("%d\n",cnt);
	else puts("-1");
}