l = gets.to_i m = gets.to_i n = gets.to_i q, n = n.divmod(25) m += q q, m = m.divmod(4) l += q q, l = l.divmod(10) puts l + m + n