let a, b, c = Scanf.scanf " %d %d %d" @@ fun a b c -> a, b, c
let rec f n a b c = if a mod 2 + b mod 2 + c mod 2 > 0 then n else if a = b && b = c then -1 else f (n + 1) (b / 2 + c / 2) (c / 2 + a / 2) (a / 2 + b / 2)
let _ = Printf.printf "%d\n" @@ f 0 a b c