using System; using System.Linq; using System.Collections.Generic; using System.Collections; namespace Algorithm { class Program { static void Main(string[] args) { var l = Console.ReadLine().Split().Select(int.Parse).ToArray(); int X = l[0], Y = l[1], Z = l[2]; foreach (var a in Enumerable.Range(1, Z)) { if (X <= Y) X++; else Y++; Z--; } Console.WriteLine(Math.Min(X, Y)); } } }