(* O(1) *)
let a, b, c = Scanf.scanf " %d %d %d" @@ fun a b c -> a, b, c
let m = max a @@ max b c
let ec = List.filter (fun n -> n mod 2 = 0) [a; b; c] |> List.length
let x = m + if (ec = 1 || ec = 2) && m mod 2 = 2 - ec then 1 else 0
let _ = Printf.printf "%d\n" @@ (3 * x - (a + b + c)) / 2