using System;

namespace ConsoleApp11
{
    class Program
    {
        static void Main(string[] args)
        {
            int L = int.Parse(Console.ReadLine());
            int M = int.Parse(Console.ReadLine());
            int N = int.Parse(Console.ReadLine());

            L = L % 25;
            M += L / 25;
            M = M % 4;
            N += M / 25;
            N = N % 10;

            Console.WriteLine(L + M + N);
        }
    }
}