inputs = STDIN.readlines.map(&:chomp) l = inputs[0].to_i m = inputs[1].to_i n = inputs[2].to_i total = l * 100 + m * 25 + n new_l = (total % 1000) / 100 new_m = (total % 100) / 25 new_n = total % 25 puts new_l + new_m + new_n