; or (ii) terminate such assistance. (B) Pro rata reduction For purposes of subparagraph (A)(i), the amount of a pro rata reduction in assistance shall be determined by multiplying the amount of monthly assistance that would, in the absence of the application of this paragraph be paid to the entire family, by the ratio of— (i) the hours of required work and work preparation activities performed by the eligible participant during the month; over (ii) the number or hours of work and work preparation the State required the eligible participant to perform in accordance with the requirements of this section. (9) Limitation on countable hours of participation in community service or workfare (A) In general The maximum number of hours that an eligible participant may be counted as engaging in a community service program or a workfare program in a month for purposes of meeting the minimum work preparation rates for the month under this subsection shall not exceed the total dollar cost of all means-tested benefits received by the eligible participant's family for the month divided by the Federal minimum wage. (B) Total dollar cost of all means-tested benefits defined (i) In general In this subsection, the term total dollar cost of all means-tested benefits means the sum of the dollar cost of all benefits received by a family under— (I) the supplemental nutrition assistance program established under the Food and Nutrition Act of 2008 ( 7 U.S.C. 2011 et seq.); (II) the State program funded under this part or any other State program funded with qualified State expenditures (as defined in section 409(a)(7)(B)(i))