calc_n_optimal function

Calculates number of plots for optimal allocation with constant cost