#include <bits/stdc++.h>
using namespace std;

#define fi  first
#define se  second
#define mp  make_pair
#define pb  push_back
#define pf  push_front
#define in  insert

#define rev(v) reverse(v.begin(),v.end())
#define srt(v) sort(v.begin(),v.end())
#define grtsrt(v) sort(v.begin(),v.end(),greater<ll>())
#define all(v) v.begin(),v.end()
#define mnv(v) *min_element(v.begin(),v.end())
#define mxv(v) *max_element(v.begin(),v.end())
#define For(i,j,k) for(ll i=j;i<k;i++)
#define Rev(i,j,k) for(ll i=j;i>=k;i--)
#define Rep(i,k)   for(ll i=0;i<k;i++)

#define mnn (long long) -1000000000000000
#define mxn (long long) 1000000000000000
#define eps 1e-9
#define MOD 1000003
#define inf 0x3f3f3f3f3f3f

typedef unsigned long long ull;
typedef long long ll;
typedef vector<ll> vll;
typedef map<ll, ll> mll;
typedef pair<ll, ll> pll;
typedef pair<ll, bool> plb;

#define sl(x) scanf("%lld",&x)
#define sll(x,y) scanf("%lld %lld",&x,&y)
#define slll(x,y,z) scanf("%lld %lld %lld",&x,&y,&z)
#define sd(x) scanf("%lf",&x)
#define sdd(x,y) scanf("%lf%lf",&x,&y)
#define sddd(x,y,z) scanf("%lf%lf%lf",&x,&y,&z)
#define ss(str) scanf("%s",str)
#define pl(x) printf("%lld",x)
#define pll(x,y) printf("%lld %lld",x,y)
#define plll(x,y,z) printf("%lld %lld %lld",x,y,z)
#define ps(ss) printf("%s",ss)

#define mem(ara,val) memset(ara,val,sizeof(ara))
#define input freopen("input.txt", "r", stdin)
#define output freopen("output.txt", "w", stdout)
#define fast_io ios_base::sync_with_stdio(0);cin.tie(0);


const int maxn  =     1000005;
const double pi =     2.0*acos(0.0);
const double EPS=     1e-11;




ll sumDigit(ll n)
{
    if (n == 0)
       return 0;
    return (n % 10 + sumDigit(n / 10));
}
ll _pow(ll n,ll mod)
{
     if(n==0) return 1;
     ll k=_pow(n/2,mod);
     k=(k*k)%mod;
     if(n%2) k=(k*2)%mod;
     return k;
}
ll toNum(string s)
{
    ll ret = 0, sig = 1, i=0;
    if(!s.empty() && s[0] == '-') sig = -1, i++;
    while(i < s.size() && s[i] >= '0' && s[i] <= '9')
        ret = ret * 10 + (s[i++] - '0');
    return ret*sig;
}
string toStr(ll x)
{
    string s = "";
	if (x == 0) return "0";
	while(x > 0)
	{
		s = (char)('0' + (x % 10)) + s;
		x /= 10;
	}
	return s;
}


///Direction
/*
ll row,col;
#define valid0(x,y) x<0 || x>=row || y<0 || y>=col
#define valid1(nx,ny) nx>=1 && nx<=row && ny>=1 && ny<=col
ll fx[]={1,-1,0,0}; //4 side 2d
ll fy[]={0,0,1,-1};
//ll fx[]={+0,+0,+1,-1,-1,+1,-1,+1}; //8 side 2d
//ll fy[]={-1,+1,+0,+0,+1,+1,-1,-1};
//ll dx[] = {-2, -2, -1, -1, +1, +1, +2, +2};//Knight move
//ll dy[] = {-1, +1, -2, +2, -2, +2, -1, +1};

*/
//Needed variables and arrays
//I am such a bad person to keep them outside from all functions and using them continuously :p such selflessness xD

//ll a,b,c,d,e,f,n;
string s,t;
vector<char> vc;
ll lcs(ll x , ll y)
{
    if(x== 0 or y==0) return 0;
    else if(s[x-1]==t[y-1]) {vc.pb(s[x-1]); return 1+lcs(x-1,y-1);}
    else return max(lcs(x-1,y),lcs(x,y-1));
}
void solve(ll idx)
{

}
ll ar[5003];
ll lim = 100000000;
void read()
{
    ll a,b,c;
    cin>>a>>b>>c;
    int ans = 0;

    ll tmpa,tmpb,tmpc;
    while(ans <= lim){
        tmpa = tmpb = tmpc = 0;

        bool flag = false;
        if(!(a&1)) tmpb += a >> 1,tmpc += a >> 1;
        else break;
        
        if(!(b&1)) tmpa += b >> 1,tmpc += b >> 1;
        else break;
        
        if(!(c&1)) tmpa += c >> 1,tmpb += c >> 1;
        else break;
        
        if(a == tmpa && b == tmpb && c == tmpc){
            cout<<-1;
            return;
        }a = tmpa;b = tmpb;c = tmpc;
        ++ ans;
    }
    if(ans <= lim) cout<<ans;
    else cout<<-1;

}


int main()
{
    read();
}


Measured memory_bytes: 256