expenditures with respect to such building if subsection (e)(3)(A)(ii)(I) did not apply and if the dollar amount in effect under subsection (e)(3)(A)(ii)(II) were two-thirds of such amount. (g) Qualified middle-Income housing project For purposes of this section— (1) In general The term qualified middle-income housing project means any project for residential rental property if— (A) 60 percent or more of the residential units in such project are both rent-restricted and occupied by individuals whose income is 100 percent or less of area median gross income, and (B) such project is not federally subsidized and is not financed with the proceeds of any federally funded grant. For purposes of subparagraph (A), residential units in a building which is not a qualified middle-income building by reason of subsection (c)(2)(B) shall not be taken into account. (2) Rent-restricted units (A) In general For purposes of paragraph (1), a residential unit is rent-restricted if the gross rent with respect to such unit does not exceed 30 percent of the imputed income limitation applicable to such unit. For purposes of the preceding sentence, the amount of the income limitation under paragraph (1) applicable for any period shall not be less than such limitation applicable for the earliest period the building (which contains the unit) was included in the determination of whether the project is a qualified middle-income housing project. (B) Gross rent For purposes of subparagraph (A), gross rent— (i) includes any utility allowance determined by the Secretary after taking into account such determinations under section 8 of the United States Housing Act of 1937, (ii) does not include any fee for a supportive service which is paid to the owner of the unit (on the basis of the middle-income status of the tenant of the unit) by any governmental program of assistance (or by an organization described in section 501(c)(3) and exempt from tax under section 501(a)) if such program (or organization) provides assistance for rent and the amount