; and (2) the sum of such Federal Direct Stafford Loans, the amount of such Federal Pell Grant, Federal Pell Plus Grant, and other financial assistance (as defined in section 480(i)) that the student receives for such academic year may not exceed the cost of attendance of such student. (II) Unsubsidized loans Notwithstanding any provision of this part or part B, for any period of instruction beginning on or after July 1, 2025, the maximum annual amount of Federal Direct Unsubsidized Stafford loans that an undergraduate student may borrow in any academic year (as defined in section 481(a)(2)) or its equivalent shall be the difference between— (aa) the median cost of college (as defined in section 472A) of the program of study in which the student is enrolled; and (bb) the sum of— (AA) the amount of Federal Direct Stafford loans awarded to such student for such academic year; and (BB) the amount of the Federal Pell Grant and Federal Pell Plus Grant under section 401 awarded to the student for such academic year, except that the sum of all Federal financial aid under this title and other financial assistance (as defined in section 480(i)) that such student receives for such academic year may not exceed the cost of attendance for such student. (ii) Aggregate limits Notwithstanding any provision of this part or part B, for any period of instruction beginning on or after July 1, 2025, with respect to an undergraduate student— (I) the maximum aggregate amount of Federal Direct Stafford loans and Federal Direct Unsubsidized Stafford loans that may be borrowed shall be $50,000; (II) the maximum aggregate amount of Federal Direct Stafford loans that may be borrowed shall be $23,000