open System

[<EntryPoint>]
let main _ =
    let [| a; b; c; |] = stdin.ReadLine().Split() |> Array.map int
    let isOdd n = n % 2 = 1
    let isEven n = n % 2 = 0
    let rec simulate n (a, b, c) =
        if isOdd a || isOdd b || isOdd c then
            n
        else
            simulate (n + 1) ((b + c) / 2, (a + b) / 2, (c + a) / 2)
    if a = b && b = c && isEven a && isEven b && isEven c then
        stdout.WriteLine -1
    else
        (a, b, c) |> simulate 0 |> stdout.WriteLine
    0
