local a, b, c = io.read("*n", "*n", "*n")
local cnt = 0
while true do
  if 0 < a % 2 + b % 2 + c % 2 then
    break
  end
  if a == b and b == c then
    cnt = -1
    break
  end
  cnt = cnt + 1
  a, b, c = (b + c) // 2, (a + c) // 2, (a + b) // 2
end
print(cnt)
