; (2) States with the highest average or highest median periods individuals have been on such a list; and (3) States with individuals on such a list who have the lowest income levels, as compared to the income of individuals on such a list of other eligible States. (d) Funding (1) Funds allocated to States Of the funds available for purposes of carrying out this section under section 1941(c) of the Social Security Act ( 42 U.S.C. 1396w–1(c) ), the Secretary shall allocate such funds to States selected under subsection (c) on the basis of criteria, including a State’s application submitted under subsection (b), the availability of funds under such section 1941(c), and criteria specified under subsection (c), as determined by the Secretary. (2) Payments to States For each calendar quarter beginning on or after October 1, 2017, the Secretary shall pay to each State selected under subsection (c), from the allocation made to the State under paragraph (1), an amount equal to 90 percent of the Federal medical assistance percentage of the amount expended during such quarter for the medical assistance described in subsection (a). (e) Definitions In this section: (1) Federal medical assistance percentage The term Federal medical assistance percentage has the meaning given such term in section 1905(b) of the Social Security Act ( 42 U.S.C. 1396d(b) ). (2) Medical assistance The term medical assistance has the meaning given such term in section 1905(a) of the Social Security Act ( 42 U.S.C. 1396d(a) ). (3) State The term State has the meaning given such term for purposes of title XIX of the Social Security Act ( 42 U.S.C. 1396 et seq.).