# l: 100 m: 25 n: 1 l, m, n = map(float, raw_input().split()) exchangeToM = int(n / 25) n = int(n % 25) m = exchangeToM + m exchangeToL = int(m / 4) m = int(m % 4) l = exchangeToL + l exchangeToK = int(l / 10) l = int(l % 10) print n + m + l