#include<cstdio>
#include<iostream>
using namespace std;
int main()
{
	int a,b,c;
	scanf("%d%d%d",&a,&b,&c);
	
		int ct1=0,ct2=0,ct3=0;
		while(a)
		{
			a=a/2;b=b/2;c=c/2;
			ct1++;
			if(a%2!=0&&(b%2==0||c%2==0))
			{
				cout<<ct1<<endl;return 0;
			}
			if(b%2!=0&&(a%2==0||c%2==0))
			{
				cout<<ct1<<endl;return 0;
			}
			if(c%2!=0&&(a%2==0||b%2==0))
			{
				cout<<ct1<<endl;return 0;
			}
	
		}
	cout<<"-1"<<endl;        
	
	return 0;
	
}