using System; namespace AtCorder { internal class Program { private static void Main(string[] args) { var abcArr = Console.ReadLine().Split(' '); var a = int.Parse(abcArr[0]); var b = int.Parse(abcArr[1]); var c = int.Parse(abcArr[2]); var result = Math.Min(a, b); var difAB = Math.Max(a, b) - result; if (difAB < c) { result += difAB + ((c - difAB) / 2); } else { result += c; } Console.Write(result); } } }