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