; and (ii) in subparagraph (B), by striking paragraph (1)(F)(i) and inserting paragraph (1)(E)(i) ; and (D) by adding at the end the following new paragraphs: (9) For purposes of clauses (i) and (ii) of paragraph (2)(A), in the case of a surviving divorced husband, the amount determined under either such clause (and, for purposes of clause (ii) of paragraph (2)(A), as determined after application of paragraph (10)) shall be equal to the applicable percentage (as determined under section 202(c)(2)(B)) of such amount (as determined before application of this paragraph but after application of subsection (k)(3)). (10) For purposes of paragraph (2)(A)(ii), the amount determined under such paragraph shall not exceed the primary insurance amount for such month of a hypothetical individual— (A) who became entitled to old-age insurance benefits upon attaining early retirement age during the month in which the deceased individual referred to in paragraph (1) became entitled to old-age or disability insurance benefits, or died (before becoming entitled to such benefits), and (B) to whom wages and self-employment income were credited in each of such hypothetical individual’s elapsed years (within the meaning of section 215(b)(2)(B)(iii)) in an amount equal to the national average wage index (as described in section 209(k)(1)) for each such year. . (b) Effective date The amendments made by this section shall apply with respect to widow’s and widower’s insurance benefits payable for months after December 2018. 7. Holding SSI beneficiaries harmless For purposes of determining the income of an individual to establish eligibility for, and the amount of, benefits payable under title XVI of the Social Security Act, the amount of any benefit to which the individual is entitled under title II of such Act shall be deemed not to exceed the amount of the benefit that would be determined for such individual under such title as in effect on the day before the date of the enactment of this Act.