main = do
  [a, b, c] <- map read . words <$> getLine
  putStr . show $ f a b c

f a b c
  | mod a 2 == 1 = 0
  | mod b 2 == 1 = 0
  | mod c 2 == 1 = 0
  | a == b && b == c = -1
  | otherwise = 1 + f (div (b+c) 2) (div (c+a) 2) (div (a+b) 2)