After some fiddling I have y = x up to x=1 (the cap), and y=log10(x^2.1) gives a decent-looking curve for x>1 that hits twice the cap at three times the input and thrice the cap at 9x the input, but
And I think the answer is going to involve: given y=(N/C), solve for x, then take x' = x+(E/C) and compute y' from that, and the final number of stacks is y' * C