using System; public class Hello{ public static void Main(){ string[] list = Console.ReadLine().Trim().Split(' '); int red = int.Parse(list[0]); int blue = int.Parse(list[1]); int white = int.Parse(list[2]); if((red - blue)>white){ Console.WriteLine(blue + white); }else if((blue - red)>white){ Console.WriteLine(red + white); }else if(red>blue){ white -=red-blue; Console.WriteLine(red + white/2); }else if(blue>red){ white -=blue-red; Console.WriteLine(blue + white/2); }else{ Console.WriteLine(red + white/2); } } }