using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

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

            var target = (L * 100 + M * 25 + S) % 1000;

            int count = 0;
            count += target / 100;
            count += (target % 100) / 25;
            count += target % 25;

            Console.WriteLine(count);
        }
    }
}