#include <iostream>
using namespace std;

int main()
{
	int a,b,c;
	int k = 0;
	cin >> a >> b >> c;
	while(!(a == b && a == c) && !(a % 2) && !(b % 2) && !(c % 2))
	{
		k++;
		int tmp_a = (b+c)/2;
		int tmp_b = (a+c)/2;
		c = (a+b)/2;
		a = tmp_a;
		b = tmp_b;
	}
	if((a % 2) || (b % 2) || (c % 2))
		cout << k << endl;
	else
		cout << -1 << endl; 
	return 0;
} 