using System; using System.Collections.Generic; using System.Linq; namespace yukicoder { public class Program { public static void Main() { var s = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray(); var sum = 0; sum = Make(s, sum); Console.WriteLine(sum); } public static int Make(int[] s,int sum) { Array.Sort(s); sum += s[0]; s = s.Select(x => x - s[0]).ToArray(); if (!s.All(x => x < 3)) { var k = (s[2] - s[1]) / 2; if (k == 0) { k = s[2] / 4; } if (k == 0) { k = 1; } s = new int[3] { k, s[1], s[2] - k * 2 }; sum = Make(s, sum); } return sum; } } }