Allocating S corp. losses to acquiring and terminating shareholders