LCM Rule for Ending Inventory