#include<iostream>

using namespace std;

int main(){
	int a, b, c, ans = 0;
	cin >> a >> b >> c;
	if(a == b && b == c){ 
		cout << ((a % 2 == 0)? -1 : 0) << endl;
		return 0;
	}
	while(a % 2 == 0 && b % 2 == 0 && c % 2 == 0){
		int x = a, y = b, z = c;
		a = (y + z) / 2;
		b = (x + z) / 2;
		c = (z + y) / 2;
		ans++;
	}
	cout << ans << endl;
	return 0;
}