using System; using System.Linq; class Program { static void Main(string[] args) { var damage = Console.ReadLine().Split().Select(int.Parse).ToArray(); Console.WriteLine(Math.Max(damage.Sum(), damage[2] * 3)); } }