#import <stdio.h>
typedef long long INT;
int main(){
    INT a,b,c;
    scanf("%lld %lld %lld",&a,&b,&c);
    if(a==b&&b==c) {
        puts("-1");
        return 0;
    }else{
        INT i=0;
        while(a%2==0&&b%2==0&&c%2==0){
            i++;
            INT A=(b+c)/2;
            INT B=(c+a)/2;
            INT C=(a+b)/2;
            a=A;
            b=B;
            c=C;
        }
        printf("%lld",i);
    }
}
