After you file

the AAA a/c if negative can not reflect distributions made during the year. that has to go to one of the other columns.

 

here's a link to 1120S instructions look at the instructions for the M-2. they get complicated if the corp was once a C-corp and had undistributed profits.  if never a C-corp, I'll save you some reading by saying the distribution has to go in the OAA column.

 

https://www.irs.gov/pub/irs-pdf/i1120s.pdf