Unrecovered investment
For purposes of this subsection, the unrecovered investment in the contract as of any date is—
(A)#
the investment in the contract (determined without regard to subsection (c)(2)) as of the annuity starting date, reduced by
(B)#
the aggregate amount received under the contract on or after such annuity starting date and before the date as of which the determination is being made, to the extent such amount was excludable from gross income under this subtitle.