Subject to the provisions of paragraph (2) of this subsection, the amount of the educational assistance benefits paid to an eligible veteran who is pursuing a program of education under this chapter while incarcerated in a Federal, State, local, or other penal institution or correctional facility for conviction of a felony may not exceed the lesser of (A) such amount as the Secretary determines, in accordance with regulations which the Secretary shall prescribe, is necessary to cover the cost of established charges for tuition and fees required of similarly circumstanced nonveterans enrolled in the same program and the cost of necessary supplies, books, and equipment, or (B) the applicable monthly benefit payment otherwise prescribed in this section or
section 3233 of this title. The amount of the educational assistance benefits payable to a veteran while so incarcerated shall be reduced to the extent that the tuition and fees of the veteran for any course are paid under any Federal program (other than a program administered by the Secretary) or under any State or local program.