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

int main(){
    long long a,b,c,x,y,z,counter=0;
    cin>>a>>b>>c;
    if(a==b && b==c)cout<<-1,exit(0);
    while(!(a%2) && !(b%2) && !(c%2)){
        x=y=z=0;
        x=b/2 + c/2;
        y=a/2 + c/2;
        z=a/2 + b/2;
        a=x;
        b=y;
        c=z;
        counter++;
    }
    cout<<counter<<endl;
return 0;
}
