the cost-of-living adjustment determined under section 1(f)(3) for the calendar year in which the taxable year begins, by substituting for “calendar year 2016” in subparagraph (A)(ii) thereof—
(i)#
“calendar year 1987” in the case of the dollar amounts contained in paragraph (2)(B), (2)(C), or (5)(A) or subsection (f), and
(ii)#
“calendar year 1997” in the case of the dollar amount contained in paragraph (5)(B).