I figured out the wasteless math, but I'm sure there's all sorts of tricks to making a solution with less height that I haven't figured out yet