//by xiqiao
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int a,b,c;
int main(){
	scanf("%d%d%d",&a,&b,&c);
	for(int i=0;i<=1000000;i++){
		if(a%2==1 || b%2==1 || c%2==1){
			printf("%d\n",i);return 0;
		}
		int x=a/2,y=b/2,z=c/2;
		a=y+z;b=x+z;c=x+y;
	}
	puts("-1");
	return 0;
}