main = do
  [a,b,c] <- map read . words <$> getLine
  print $ solve (a,b,c) 0

solve :: (Int,Int,Int) -> Int -> Int
solve (a,b,c) k
  | a `mod` 2 == 1 || b `mod` 2 == 1 || c `mod` 2 == 1 = k
  | a == b && b == c = -1
  | otherwise = solve ((a+b) `div` 2,(a+c)`div`2,(b+c)`div`2) (k+1)