(A) Except as provided by subparagraph (B), the wages paid in and self-employment income credited to each of an individual’s computation base years for purposes of the selection therefrom of benefit computation years under paragraph (2) shall be deemed to be equal to the product of— (i) the wages and self-employment income paid in or credited to such year (as determined without regard to this subparagraph), and (ii) the quotient obtained by dividing— (I) the national average wage index (as defined in section 409(k)(1) of this title ) for the second calendar year preceding the earliest of the year of the individual’s death, eligibility for an old-age insurance benefit, or eligibility for a disability insurance benefit (except that the year in which the individual dies, or becomes eligible, shall not be considered as such year if the individual was entitled to disability insurance benefits for any month in the 12-month period immediately preceding such death or eligibility, but there shall be counted instead the year of the individual’s eligibility for the disability insurance benefit to which he was entitled in such 12-month period), by (II) the national average wage index (as so defined) for the computation base year for which the determination is made.
(B) Wages paid in or self-employment income credited to an individual’s computation base year which— (i) occurs after the second calendar year specified in subparagraph (A)(ii)(I), or (ii) is a year treated under subsection (f)(2)(C) as though it were the last year of the period specified in paragraph (2)(B)(ii), shall be available for use in determining an individual’s benefit computation years, but without applying subparagraph (A) of this paragraph.