#include <iostream>
using namespace std;


int main(void) {
	int A, B, C;
	cin >> A >> B >> C;

	int ans = 0;
	for (; ans<1000; ans++) {
		if (((A|B|C)&1)==1) break;
		int a = A, b = B, c = C;
		A = (b>>1) + (c>>1);
		B = (a>>1) + (c>>1);
		C = (a>>1) + (b>>1);
	}
	
	if (ans>=1000) ans = -1;
	cout << ans << endl;
	return 0;
}
