open System [] module Cin = let read f = stdin.ReadLine() |> f let reada f = stdin.ReadLine().Split() |> Array.map f let readInts() = read string |> Seq.toArray |> Array.map (fun x -> Convert.ToInt32(x.ToString())) module Util = let strRev s = s |> Seq.rev |> Seq.map string |> String.concat "" [] let main _ = let [|X;Y;Z|] = reada int let nin = min X Y let nax = max X Y let rem = Z - (nax-nin) printfn "%d" (nax + rem / 2) 0 // return an integer exit code