let rec judge a b c acc =
    if a % 2 = 1 || b % 2 = 1 || c % 2 = 1
    then acc
    elif a = b && b = c
    then -1
    else judge ((b + c) / 2) ((c + a) / 2) ((a + b) / 2) (acc + 1)

//let input = [| [| 4; 12; 20 |]; [| 14; 14; 14 |]; [| 454; 414; 444 |] |]
//for i in input do (judge i.[0] i.[1] i.[2] 0 |> printfn "%d")
// expected 3; -1; 1
[<EntryPoint>]
let main argv =
    stdin.ReadLine().Split()
    |> Array.map int
    |> fun x -> judge x.[0] x.[1] x.[2] 0
    |> printfn "%d"
    0
