This is a combination math/contruction problem, and my brain melts every time I try to sort it out. We're almost done putting on a metal roof, but the flashing they got doesn't sit properly due to the outer rib of the roofing , so we talked with the guy and figured out something else he liked. Since the new stuff is slightly more expensive and there's a small return penalty on the old stuff, we need to have as little waste as possible when ordering the new stuff.
There are seven edges of the roof that need to be flashed. Two edges are 18' long, two edges are 23'3" long, and three edges are 20'8" long. The flashing comes in lengths of 14' and 9', any seams need to add 3 inches (total) of overlap, and any piece less than 2' long can't be used, and we must use a full length piece whenever possible, so no patching an entire edge in with leftover scrap. What is the minimum amount of flashing I need to order?