#include<cstdio>

int a, b, c;

int main() {
	scanf("%d%d%d", &a, &b, &c);
	int cnt = 0;
	while(a%2==0 && b%2==0 && c%2==0 && (a!=b || b!=c)) {
		int A = b/2 + c/2;
		int B = a/2 + c/2;
		int C = a/2 + b/2;
		a=A; b=B; c=C;
		cnt++;
	}
	if(a%2 || b%2 || c%2) printf("%d\n", cnt);
	else puts("-1");
	
	return 0;
}