program prob3
    implicit none
    integer :: a,b,c,cnt,tmp1, tmp2
    read(*,*) a,b,c

    if(a == b .and. b == c) then
        write(*,'(a)') '-1'
        stop
    end if

    cnt = 0
    do while(mod(a,2) == 0 .and. mod(b,2) == 0 .and. mod(c,2) == 0)
        tmp1 = (a+b)/2
        tmp2 = (b+c)/2
        b = (c+a)/2
        c = tmp1
        a = tmp2
        cnt = cnt + 1
    end do

    write(*,'(i6)') cnt 


    stop
contains
end program prob3