l = gets.to_i m = gets.to_i n = gets.to_i ans = 0 a, b = n.divmod(25) m += a ans += b c, d = m.divmod(4) l += c ans += d e, f = l.divmod(10) ans += f puts ans