using System; using System.Linq; public class P0032 { public static void Main() { var l = int.Parse(Console.ReadLine().Trim()); var m = int.Parse(Console.ReadLine().Trim()); var n = int.Parse(Console.ReadLine().Trim()); var total = 100*l + 25*m + n; var limit1000 = total / 1000; var limit100 = Math.Min(limit1000*10, (25*m + n) / 100); var limit25 = Math.Min(limit100*4, n / 25); var nUsed = limit25 * 25; var mUsed = limit100 * 4 - limit25; var lUsed = limit1000 * 10 - limit100; Console.WriteLine(l+m+n -lUsed-mUsed-nUsed); } }