provided in subparagraph (D), the State housing credit ceiling for each calendar year shall be allocated to the housing credit agency of such State. If there is more than 1 housing credit agency of a State, all such agencies shall be treated as a single agency. (C) State housing credit ceiling The State housing credit ceiling applicable to any State for any calendar year shall be an amount equal to the sum of— (i) the greater of— (I) $1.00 multiplied by the State population, or (II) $1,140,000, plus (ii) the amount of State housing credit ceiling returned in the calendar year. For purposes of clause (ii), the amount of State housing credit ceiling returned in the calendar year equals the housing credit dollar amount previously allocated within the State to any project which fails to meet the 10 percent test under paragraph (1)(E)(ii) on a date after the close of the calendar year in which the allocation was made or which does not become a qualified middle-income housing project within the period required by this section or the terms of the allocation or to any project with respect to which an allocation is cancelled by mutual consent of the housing credit agency and the allocation recipient. (D) State may provide for different allocation Rules similar to the rules of section 146(e) (other than paragraph (2)(B) thereof) shall apply for purposes of this paragraph. (E) Population For purposes of this paragraph, population shall be determined in accordance with section 146(j). (F) Cost-of-living adjustment (i) In general In the case of a calendar year after 2019, the $1,140,000 and $1.00 amounts in subparagraph (C) shall each be increased by an amount equal to— (I) such dollar amount, multiplied by (II) the cost-of-living adjustment determined under section 1(f)(3) for such calendar year by substituting calendar year 2018 for calendar year 2016 in subparagraph (A)(ii) thereof. (ii) Rounding (I) In the case of the $1,140,000 amount, any increase under clause (i) which is not a multiple of $5,000 shall be rounded to