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

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

         a0 = a
         b0 = b
         c0 = c

         k = k + 1
         cycle

      else

         write(*,*) k

         exit

      end if


   end do
end if
stop

end program main

 
 
