obtain maximum profit