the partner from the partnership on or before such day (net of any liabilities the partner is considered to assume or take subject to), plus (II) the aggregate amount of the partner's distributive share of loss and deductions of the partnership as of such day. (B) Special rules (i) In general For purposes of subparagraph (A), invested capital shall be determined— (I) without regard to amounts considered as a contribution of money or as a distribution of money by reason of subsection (a) or (B) of section 752, and (II) without regard to income required to be recognized by a contributing partner under section 704(c) with respect to property described in subparagraph (A)(i)(I). (ii) Adjustments The Secretary may provide for rules making such adjustments as the Secretary determines necessary to the determination of invested capital under subparagraph (A) in order to carry out the purposes of this section. (C) Treatment of borrowings from partnerships or other partners For purposes of paragraph (1)(A), the amount of invested capital with respect to any applicable partnership interest shall be reduced by the amount of any applicable loan to a partner who is described in subsection (b)(1)(B). (5) Accelerated inclusion in case of disposition of applicable partnership interest (A) In general If a taxpayer who holds an applicable partnership interest sells or disposes of any portion of such interest during a taxable year in the applicable period, the amount determined under this subsection for such taxable year shall be the sum of— (i) the amount determined under paragraph (1) for the taxable year (determined as if no such sale or disposition had occurred), plus (ii) an amount equal to the product of— (I) the excess of the amount determined under clause (i) over the amount determined under paragraph (1) for the taxable year, and (II) the number of taxable years beginning after the date of the sale or disposition and before the last day of the applicable period. (B) Applicable period For purposes of this paragraph, the