How to calculate marginal revenue