using System; using System.Collections.Generic; using System.Linq; using System.IO; using System.Text; using static System.Console; using static System.Math; namespace CP { class Atria { static void Main(string[] args) { int l = int.Parse(ReadLine()); int m = int.Parse(ReadLine()); int n = int.Parse(ReadLine()); while (n >= 25) { n -= 25; m++; } while (m >= 4) { m -= 4; l++; } while (l >= 10) { l -= 10; } WriteLine(l+m+n); } } }