/*Md: Shamim Imtiaz*/

#include<bits/stdc++.h>

using namespace std;

/*-----------------------------*/
#define  READ   freopen("C:\\Users\\Lab1\\Desktop\\input.txt","r",stdin)
#define  WRITE  freopen("C:\\Users\\Lab1\\Desktop\\output.txt","w",stdout)
#define  _cin   ios_base::sync_with_stdio(0); cin.tie(0);cout.tie(0);

#define sc scanf
#define ll long long int
#define ull unsigned long long int
#define sc1(a) scanf("%lld",&a)
#define sc2(a,b) scanf("%lld%lld",&a,&b)
#define scu1(a) scanf("%llu",&a)
#define scu2(a,b) scanf("%llu%llu",&a,&b)
#define sci1(a) scanf("%d",&a)
#define sci2(a,b) scanf("%d%d",&a,&b)

#define mx 200000000000LL
#define mod 1000000007LL
#define eps 0.0000001
#define inf 999999999999999LL
#define pi 2*acos(0.00)
#define pb(a) push_back(a)
#define mem0(a) memset(a,0,sizeof a)
#define mem1(a) memset(a,-1,sizeof a)

#define fr1(n,i) for(int i=1; i<=n; i++)
#define fr0(n,i) for(int i=0; i<n; i++)

#define pf printf
#define pf1(a) printf("%lld\n",a)
#define pf2(a,b) printf("%lld %lld\n",a,b)
#define pfi1(a) printf("%d\n",a)
#define pfi2(a,b) printf("%d %d\n",a,b)
#define pfu1(a) printf("%llu\n",a)
#define pfu2(a,b) printf("%llu %llu\n",a,b)

#define w1(a) while(scanf("%lld",&a)==1)
#define w2(a,b) while(scanf("%lld%lld",&a,&b)==2)
#define wi1(a) while(scanf("%d",&a)==1)
#define wi2(a,b) while(scanf("%d%d",&a,&b)==2)
#define wu1(a) while(scanf("%llu",&a)==1)
#define wu2(a,b) while(scanf("%llu%llu",&a,&b)==2)

/*-----------------------------*/

ll p4[]= {-1,1,0,0};
ll q4[]= {0,0,1,-1};
ll p8[]= {-1,1,0,0,-1,1,-1,1};
ll q8[]= {0,0,1,-1,1,1,-1,-1};

ll  gcd(ll a, ll b)
{
    if(b>a)gcd(b,a);
    return ((b==0)?a:gcd(b,a%b));
}

ll  LCM(ll a, ll b)
{
    ll p=(a*b)/(gcd(a,b));
    return p;
}

ll BigMod(ll a, ll b, ll m)
{
    if(!b)return 1;
    ll ans = BigMod(a, b/2, m);
    ans = (ans*ans)%m;
    if(b&1) ans = (ans*a)%m;
    return ans;
}

ll Mod_inv(ll a)
{
    return BigMod(a,mod-2,mod);
}

ll arra[78502];
bool arre[1000002];
ll pl=0;//prime length
void prime_seive()
{
    memset(arre,true,sizeof(arre));
    arre[0]=arre[1]=false;
    for(int i=4; i<=1000000; i+=2) arre[i]=false;
    for(int i=3; i*i<=1000000; i+=2)
        if(arre[i]) for(int j=i*i; j<=1000000; j+=i+i) arre[j]=false;
    arra[pl++]=2;
    for(int i=3;i<=1000000;i+=2) if(arre[i]) arra[pl++]=i;
}
ll prime(ll a)
{
    prime_seive();
    if(a==1) return 1;
    else if(a==2) return 0;
    else if(a%2==0) return 1;
    else for(int i=1;i<pl&&(arra[i]*arra[i]<=a);i++) if(a%arra[i]==0) return 1;
    return 0;
}

/*-----------------------------*/
ll a[1000005],b[1000005];
vector<ll>v,v1,v2;
map<ll,ll>mp;
int main()
{
    ll i,j,k,l,m,n,c,d,p,q;
    ll cs=0,tc,t=1,flg,f,sm;
    string s,s1,s2;
    while(cin >> n >> m >> k)
    {
        if(n%2==1 || m%2==1 || k%2==1)
            cout << 0 << endl;
        else if(n==m && m==k)
            cout << -1 << endl;
        else
        {
            for(i=0;i<=100000;i++)
            {
                if(n%2==1 || m%2==1 || k%2==1)
                {
                    cout << i << endl;
                    break;
                }
                p=m/2+k/2;
                q=n/2+k/2;
                f=n/2+m/2;
                n=p,m=q,k=f;
            }
        }
    }
    return 0;
}


Measured memory_bytes: 256