program sample
	implicit none
    integer(8) :: x,y,z,a,b,c,count
    
    read(*,*) x,y,z
    count=0
	if (mod(x,2)==0 .and. mod(y,2)==0 .and. mod(z,2) ==0) then
    	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
    else
    	write(*,*) count
    end if
    
    stop
end program sample