; or (II) after such date, the State may terminate the enrollment of such individual. (B) Relationship of enrollment to payment for services (i) In general Subject to subparagraph (A)(ii), an eligible individual who is enrolled, or whose enrollment is reinstated, under subparagraph (A) shall be eligible for all services for which medical assistance is provided under the State plan after the date that the eligible individual is released from the public institution. (ii) Relationship to payment prohibition for inmates No provision of this paragraph may be construed to permit payment for care or services for which payment is excluded under subdivision (A) following paragraph (29) of section 1905(a). (C) Treatment of continuous eligibility (i) Suspension for inmates Any period of continuous eligibility under this title shall be suspended on the date an individual enrolled under this title becomes an inmate of a public institution (except as a patient of a medical institution). (ii) Determination of remaining period Notwithstanding any changes to State law related to continuous eligibility during the time that an individual is an inmate of a public institution (except as a patient of a medical institution), subject to clause (iii), with respect to an eligible individual who was subject to a suspension under clause (i), on the date that such individual is released from a public institution the suspension of continuous eligibility under such clause shall be lifted for a period that is equal to the time remaining in the period of continuous eligibility for such individual on the date that such period was suspended under such clause. (iii) Exception If a State makes a determination that an individual is not eligible to be enrolled under the State plan— (I) on or before the date that the suspension of continuous eligibility is lifted under clause (ii), such clause shall not apply to such individual