and inserting the issuer of such stock . (c) Effective Date The amendments made by this section shall take effect on January 1, 2018. 5. Charitable contribution deduction for electing small business trusts (a) In general Section 641(c)(2) is amended by inserting after subparagraph (D) the following new subparagraph: (E) (i) Section 642(c) shall not apply. (ii) For purposes of section 170(b)(1)(G), adjusted gross income shall be computed in the same manner as in the case of an individual, except that the deductions for costs which are paid or incurred in connection with the administration of the trust and which would not have been incurred if the property were not held in such trust shall be treated as allowable in arriving at adjusted gross income. . (b) Effective date The amendment made by this section shall apply to taxable years beginning after December 31, 2017. 6. Amortization of S corporation built-in gain amount upon death of shareholder (a) In general Part II of subchapter S of chapter 1 is amended by adding at the end the following: 1369. Amortization of built-in gain amount upon death of shareholder (a) In general A person holding stock in an electing S corporation the basis of which is determined under section 1014(a) (hereafter in this section referred to as the shareholder ) shall be allowed a deduction with respect to the S corporation built-in gain amount. The amount of such deduction for any taxable year shall be determined by amortizing the S corporation built-in gain amount over the 15-year period beginning with the month which includes the applicable valuation date. (b) S corporation built-In gain amount For purposes of this section, the term S corporation built-in gain amount means the lesser of— (1) the excess (if any) of— (A) the basis of the stock referred to in subsection (a) as determined under section 1014(a), over (B) the adjusted basis of such stock immediately before the death of the decedent, or (2) the pro rata share (determined as of the applicable valuation date) of— (A) the