program main
  implicit none
  integer :: a0, b0, c0, a, b, c ,k

  read(*,*) a0, b0, c0
  k = 0
     
    do
       if(mod(a0,2) == 0 .and. mod(b0,2) == 0 .and. mod(c0,2) == 0) then
          if(a0 == b0 .and. b0 == c0) then
             write(*,*) -1
             stop
          else
             
             
         a = (b0 + c0) / 2
         b = (c0 + a0) / 2
         c = (a0 + b0) / 2

         a0 = a
         b0 = b
         c0 = c

         k = k + 1
         cycle
      
      end if

      else

         write(*,*) k

         exit

      end if


   end do
stop

end program main

 
 
