by adding at the end the following new subsection: (g) Qualified preferred bank stock If a shareholder receives a distribution (not in part or full payment in exchange for stock) from an S corporation with respect to any qualified preferred bank stock (as defined in section 1361(h))— (1) the amount of such distribution shall be includible in gross income of the shareholder, and (2) there shall be allowed as a deduction by the corporation for the taxable year of such corporation in which or with which ends the taxable year in which such amount is included in the gross income of the shareholder an amount equal to the amount which bears the same ratio to the amount of such distribution as— (A) the highest rate of tax in effect for the taxable year with respect to individuals for qualified dividend income (as defined in section 1(h)(11)), over (B) the highest rate of tax in effect for the taxable year with respect to individuals under subsections (a), (b), (c), and (d) of section 1 (after the application of subsection (i) thereof). . (c) Effective date The amendments made by this section shall apply to taxable years beginning after December 31, 2017.