using System; namespace Yukicorder_032 { class Program { static void Main(string[] args) { int L = Input(0, 1000); int M = Input(0, 1000); int N = Input(0, 1000); int Result = Processing(L, M, N); Console.WriteLine(Result); } static int Input(int Min , int Max) { int Number = 0; try { Number = int.Parse(Console.ReadLine()); if(Number < Min || Number > Max) { Console.WriteLine(Min + "以上" + Max + "以下で入力してください"); } }catch(FormatException e) { Console.WriteLine("数字を入力してください"); }catch(Exception E) { Console.WriteLine("予期せぬエラーです"); } return Number; } static int Processing(int L , int M , int N) { int Count = 0; if(N >= 25) { Count += N % 25; M += N / 25; }else{ Count += N; } if(M >= 4) { Count += M % 4; L += M / 4; }else{ Count += M; } if(L >= 10) { Count += L % 10; } return Count; } } }