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