using System; class Program { static void Main() { int a = int.Parse(Console.ReadLine()); int b = int.Parse(Console.ReadLine()); int c = int.Parse(Console.ReadLine()); b += c / 25; c = c % 25; a += b / 4; b = b % 4; a = a % 10; Console.WriteLine($"{a + b + c}"); } }