class Program { static void Main(string[] args) { string line = System.Console.ReadLine().Trim(); int L = int.Parse(line); line = System.Console.ReadLine().Trim(); int M = int.Parse(line); line = System.Console.ReadLine().Trim(); int N = int.Parse(line); int totalcount = 0; M += N / 25; totalcount += N % 25; L += M / 4; totalcount += M % 4; totalcount += L % 10; System.Console.WriteLine(totalcount); } }