(* 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 x = m + if m mod 2 = (a + b + c) mod 2 then 0 else 1
let _ = Printf.printf "%d\n" @@ (3 * x - (a + b + c)) / 2