; and (2) in the case of a community behavioral health clinic described in subsection (b)(2), meet the criteria described in section 340J–1(a). (f) Amount of grant (1) In general Subject to paragraph (2), the amount of a grant made in any fiscal year to a community behavioral health clinic under subsection (a) shall be determined by the Secretary based on information provided by the community behavioral health clinic, but may not exceed an amount equal to the difference obtained by subtracting— (A) the sum obtained by adding— (i) the total State, local, and other operational funding provided to the clinic for such fiscal year; and (ii) the fees, premiums, and third-party reimbursements that the clinic reasonably expects to receive for its operations in such fiscal year; from (B) the costs of operating the clinic to meet the purposes and requirements of the grant program under this section during such fiscal year. (2) Requirement (A) In general In determining the costs described in paragraph (1)(B), the Secretary may estimate the anticipated costs of the grant recipient in— (i) providing the services described in subsection (a), including the anticipated costs of providing any individual certified community behavioral health service that the applicant entity does not have cost experience providing at the time of submitting an application for such grant; and (ii) if applicable, meeting the criteria described in section 340J–1(a). (B) Anticipated costs The Secretary shall base the estimate of anticipated costs under subparagraph (A) on an estimate of anticipated costs provided by the applicable community behavioral health clinic. (3) Payments The Secretary may— (A) award grants under subsection (a)— (i) in advance or through reimbursement; and (ii) in installments