program sample
	implicit none
    integer(8) :: x,y,z,a,b,c,count
    
    read(*,*) x,y,z
    
    count=0
    if (x==y .and. y==z) then
    	write(*,*) -1
    else
    	do while(.true.)
    		if (mod(x+y,2) == 0 .and. mod(y+z,2) ==0 .and. mod(x+z,2) ==0) then
    			count = count+1
    		    a=(y+z)/2
    		    b=(x+z)/2
     		    c=(x+y)/2
      	     	x=a
     	    	y=b
       	    	z=c
    		else
    			write(*,*) count
    	 	   exit
    		end if
   		end do
    end if
    
    stop
end program sample