import Control.Applicative

main = do
  [a,b,c] <- map read . words <$> getLine :: IO [Int]

  print $ if even a && a==b && b==c then -1 else solve a b c

  where
    solve a b c
      | odd a || odd b || odd c = 0
      | otherwise = 1 + solve ((b+c)`div`2) ((a+c)`div`2) ((a+b)`div`2)
      
