The Cost of Goods Sold (COGS) shows up on Form 1120, line 2 as a negative amount and is added to the income instead of subtracted from it. Here's why:
If you look at the Form 1125-A for the COGS calculation, you'll see that line 7, Inventory at end of year, is greater than line 6, Total. When you add lines 1 through 5, the result is a negative amount on line 8, which is then transferred to Form 1120, line 2.
On Form 1120, line 2 is subtracted from Line 1e. Since line 2 is negative and being subtracted, it's added to Line 1e and a gain is recognized for the difference between the costs incurred and the value of the inventory.