appropriations but only if the total amount obligated from the Fund does not exceed the amount available to the Fund under subparagraphs (A) and (B) of paragraph (1). The Secretary may obligate funds from the Fund only if the Secretary determines (and the Chief Actuary of the Centers for Medicare & Medicaid Services and the appropriate budget officer certify) that there are available in the Fund sufficient amounts to cover all such obligations incurred consistent with the previous sentence. . 4. Providing Care for the most vulnerable patients on waiting lists (a) In general Subject to subsection (d), the Secretary of Health and Human Services shall provide, for each of fiscal years 2018 through 2026, payment to eligible States selected under subsection (c) to provide for medical assistance for home and community-based services under a State plan waiver under subsection (c), (d), or (i) of section 1915 of the Social Security Act ( 42 U.S.C. 1396n ) or section 1115 of the Social Security Act ( 42 U.S.C. 1315 ) to individuals who are eligible but, as of January 1, 2017, are on a waiting list for such services through such waiver. (b) State eligibility A State is eligible for a payment under this section if the State submits an application to the Secretary at such time, in such form and manner, and containing such information, provisions, and assurances, as specified by the Secretary. (c) Selection Subject to subsection (d), the Secretary shall, for each of fiscal years 2018 through 2026, select, on a competitive basis, from among eligible States, the States that will receive payment under this section. In making such selections, the Secretary shall give priority to— (1) States with the highest number of individuals on a waiting list described in subsection (a)