What is the rule for how much a firm should produce if they want to maximize profits?