program AGC014C
    implicit none
    integer(8)::A,B,C,A1,B1,C1,ans=0
    read*,A,B,C
    if(A==B.and.B==C)then
        if(mod(A,2)==0)then
            print'(i0)',-1
        else
            print'(i0)',0
        end if
    else
        do
            if(mod(A,2)==1.or.mod(B,2)==1.or.mod(C,2)==1)exit
            A1=(B+C)/2
            B1=(A+C)/2
            C1=(A+B)/2
            A=A1
            B=B1
            C=C1
            ans=ans+1
        end do
        print'(i0)',ans
    end if
end program AGC014C