Adjustment for certain scholarships, etc.
The amount of qualified tuition and related expenses otherwise taken into account under subsection (a) with respect to an individual for an academic period shall be reduced (before the application of subsections (b), (c), and (d)) by the sum of any amounts paid for the benefit of such individual which are allocable to such period as—
(A) a qualified scholarship which is excludable from gross income under section 117,
(B) an educational assistance allowance under chapter 30, 31, 32, 34, or 35 of title 38, United States Code, or under chapter 1606 of title 10, United States Code, and
(C) a payment (other than a gift, bequest, devise, or inheritance within the meaning of section 102(a)) for such individual’s educational expenses, or attributable to such individual’s enrollment at an eligible educational institution, which is excludable from gross income under any law of the United States.