Investment in the contract
For purposes of subsection (b), the investment in the contract as of the annuity starting date is—
(A)#
the aggregate amount of premiums or other consideration paid for the contract, minus
(B)#
the aggregate amount received under the contract before such date, to the extent that such amount was excludable from gross income under this subtitle or prior income tax laws.