program prob3
    implicit none
    integer(8) A, B, C, AA, BB, ans
    read(*,*) A, B, C

    ans = 0
    if(A == B .and. B == C .and. mod(A,2) == 0)then
        write(*,*) -1
        stop
    else
        do while(mod(A,2) == 0 .and. mod(B,2) == 0 .and. mod(C,2) == 0)
            AA = B/2 + C/2
            BB = A/2 + C/2
            C = A/2 + B/2
            A = AA
            B = BB
            ans = ans + 1
        end do

        write(*,*) ans
        stop
     end if

end program prob3