Finance:Inventory control problem