Profit maximization problem